--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2012/04/05 12:37:13 1773 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2012/10/13 20:55:30 1855 @@ -7,11 +7,15 @@ import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; +import dk.thoerup.bukkit.hoeruputils.chests.AdvancedChest; +import dk.thoerup.bukkit.hoeruputils.chests.ChestBean; import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands; import dk.thoerup.bukkit.hoeruputils.message.MessageBean; import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper; import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; import dk.thoerup.bukkit.hoeruputils.web.WebLoader; +import dk.thoerup.bukkit.hoeruputils.web.WebUser; +import dk.thoerup.bukkit.hoeruputils.web.WebUserCommand; public class HoerupUtilsPlugin extends JavaPlugin { @@ -42,9 +46,12 @@ HomeCommand home = new HomeCommand(this); getCommand("home").setExecutor( home ); getCommand("sethome").setExecutor( home ); + getCommand("ophome").setExecutor( home ); DiverCommand diver = new DiverCommand(this ); getCommand("diver").setExecutor( diver ); + + getCommand("opkill").setExecutor( new OpkillCommand() ); GeneralContractorCommands generalContractor = new GeneralContractorCommands(); getCommand("replay").setExecutor( generalContractor ); @@ -55,7 +62,7 @@ getCommand("platform").setExecutor( generalContractor ); getCommand("cylinder").setExecutor( generalContractor ); getCommand("createcave").setExecutor( generalContractor ); - + getCommand("spawn").setExecutor( new SpawnCommand() ); getCommand("template").setExecutor( new TemplateCommand(this) ); @@ -65,6 +72,11 @@ PluginManager pm = getServer().getPluginManager(); + MotdHandler motd = new MotdHandler(this); + getCommand("motd").setExecutor( motd ); + pm.registerEvents( motd, this); + + pm.registerEvents(logintimeHandler, this); pm.registerEvents(logintimeHandler, this); @@ -87,10 +99,13 @@ }; messageWrapper = new MessageWrapper(this, ddlInstaller); pm.registerEvents( messageWrapper, this); + + AdvancedChest locked = new AdvancedChest(this, ddlInstaller); + getCommand("chest").setExecutor(locked); + pm.registerEvents( locked, this); + - SnitchingChest snitch = new SnitchingChest(this, ddlInstaller); - getCommand("snitchingchest").setExecutor(snitch); - pm.registerEvents( snitch, this); + getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) ); //register web plugins @@ -103,7 +118,7 @@ Class.forName("de.codeinfection.quickwango.ApiBukkit.ApiServer.ApiController"); //if it fails it throws an exception WebLoader.getInstance().load(this, logintimeHandler.getConfig(), home.getConfig()); - getLogger().warning("ApiBukkit found, status listener registered"); + getLogger().info("ApiBukkit found, status listener registered"); } catch (ClassNotFoundException e) { getLogger().warning("Could not find ApiBukkit - web status is disabled" ); @@ -128,11 +143,11 @@ //@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public List> getDatabaseClasses() { - System.out.println("getDatabaseClasses"); List> list = new ArrayList>(); list.add(MessageBean.class); - list.add(SnitchingChestBean.class); + list.add(ChestBean.class); + list.add(WebUser.class); return list; }