--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2012/04/03 20:21:02 1768 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2012/09/23 18:56:24 1851 @@ -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,6 +46,7 @@ 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 ); @@ -55,7 +60,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 +70,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); @@ -75,9 +85,6 @@ - SnitchingChest snitch = new SnitchingChest(this); - getCommand("snitchingchest").setExecutor(snitch); - pm.registerEvents( snitch, this); @@ -89,7 +96,15 @@ } }; messageWrapper = new MessageWrapper(this, ddlInstaller); - pm.registerEvents( messageWrapper, this); + pm.registerEvents( messageWrapper, this); + + AdvancedChest locked = new AdvancedChest(this, ddlInstaller); + getCommand("chest").setExecutor(locked); + pm.registerEvents( locked, this); + + + getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) ); + //register web plugins //pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer(), logintimeHandler.getConfig(), home.getConfig() ), Priority.Normal, this); @@ -101,7 +116,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" ); @@ -123,13 +138,14 @@ return messageWrapper; } - @SuppressWarnings({ "unchecked", "rawtypes" }) + //@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public List> getDatabaseClasses() { - System.out.println("getDatabaseClasses"); - List list = new ArrayList(); + List> list = new ArrayList>(); list.add(MessageBean.class); + list.add(ChestBean.class); + list.add(WebUser.class); return list; }