Results 1 to 2 of 2
  1. #1
    rosaage's Avatar
    rosaage is offline Member
    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0

    Question Bukkit plugins, Help with { and }

    This is my first day of java programing and i start with a bukkit plugin i got the basics down but i can't figure out where to place the { and } and because of that i get errors (using eclipse, i have downloaded everything because i tested with a simple onEnable println)
    code so far:
    Java Code:
    package com.rosaage.Test;
    
    import org.bukkit.plugin.java.JavaPlugin;
    
    import java.io.File;
    import java.util.*;
    import org.bukkit.command.*;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.configuration.file.FileConfiguration;
    import org.bukkit.event.Event.*;
    import org.bukkit.event.player.PlayerListener;
    
    public class TestPlugin extends JavaPlugin {
    
        public void onDisable() {
        	
            System.out.println("[Ohh..] Goodbye world! Rosaage's test plugin is disabled!");
        }
        public void reloadCustomConfig() {
        	private FileConfiguration customConfig = null;
        	private File customConfigurationFile = null;
        	
            if (customConfigFile == null) {
            customConfigFile = new File(getDataFolder(), "config.yml");
            customConfig = YamlConfiguration.loadConfiguration(customConfigFile);
            }
            InputStream defConfigStream = getResource("config.yml");
            if (defConfigStream != null) {
                YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);
                customConfig.setDefaults(defConfig);
            }
        public void onEnable() {
    
            System.out.println( "[YAY!] Hello World! Rosaage's test plugin is enabled!" );
            this.getServer().getPluginManager().registerEvent(Type.PLAYER_JOIN,
                    new PlayerListener() {
     
                        @Override
                        public void onPlayerJoin(PlayerJoinEvent event) {
                            event.getPlayer().sendMessage(getConfig().getString("message"));
                        }
                    },
            
           this.getCommand("Killme").setExecutor(new CommandExecutor() {
            	 
               public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
            	
                   return true;
               }

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Bukkit plugins, Help with { and }

    This is my first day of java programing and i start with a bukkit plugin
    What's a 'bukkit plugin'?

    Since you're totally new to Java you would be better starting here: The Java™ Tutorials

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. cannot install plugins
    By gafa in forum NetBeans
    Replies: 9
    Last Post: 07-09-2010, 04:06 AM
  2. from wher i get the plugins
    By javastuden in forum Eclipse
    Replies: 1
    Last Post: 05-19-2010, 02:07 PM
  3. plugins & gnatbench
    By eclipseUser in forum Eclipse
    Replies: 0
    Last Post: 12-15-2008, 05:23 PM
  4. spring plugins
    By freddieMaize in forum Web Frameworks
    Replies: 1
    Last Post: 05-28-2008, 08:36 PM
  5. GUI Plugins
    By ravian in forum Eclipse
    Replies: 1
    Last Post: 11-13-2007, 11:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •