Results 1 to 2 of 2
- 12-22-2011, 08:56 PM #1
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; }
- 12-23-2011, 11:04 AM #2
Re: Bukkit plugins, Help with { and }
What's a 'bukkit plugin'?This is my first day of java programing and i start with a bukkit plugin
Since you're totally new to Java you would be better starting here: The Java™ Tutorials
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
cannot install plugins
By gafa in forum NetBeansReplies: 9Last Post: 07-09-2010, 04:06 AM -
from wher i get the plugins
By javastuden in forum EclipseReplies: 1Last Post: 05-19-2010, 02:07 PM -
plugins & gnatbench
By eclipseUser in forum EclipseReplies: 0Last Post: 12-15-2008, 05:23 PM -
spring plugins
By freddieMaize in forum Web FrameworksReplies: 1Last Post: 05-28-2008, 08:36 PM -
GUI Plugins
By ravian in forum EclipseReplies: 1Last Post: 11-13-2007, 11:18 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks