--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2012/01/27 14:12:37 1685 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2012/03/19 09:52:18 1754 @@ -1,18 +1,15 @@ package dk.thoerup.bukkit.hoeruputils; -import org.bukkit.event.Event; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; - +import de.codeinfection.quickwango.ApiBukkit.ApiBukkit; +import de.codeinfection.quickwango.ApiBukkit.ApiServer.ApiManager; +import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands; import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; -import dk.thoerup.bukkit.hoeruputils.web.MessageListener; import dk.thoerup.bukkit.hoeruputils.web.StatusListener; - -import de.codeinfection.quickwango.ApiBukkit.ApiBukkit; - public class HoerupUtilsPlugin extends JavaPlugin { @Override @@ -43,7 +40,19 @@ DiverCommand diver = new DiverCommand(this ); getCommand("diver").setExecutor( diver ); + + GeneralContractorCommands generalContractor = new GeneralContractorCommands(); + getCommand("replay").setExecutor( generalContractor ); + getCommand("levelarea").setExecutor( generalContractor ); + getCommand("fillarea").setExecutor( generalContractor ); + getCommand("slopearea").setExecutor( generalContractor ); + getCommand("setsurface").setExecutor( generalContractor ); + getCommand("platform").setExecutor( generalContractor ); + getCommand("cylinder").setExecutor( generalContractor ); + getCommand("createcave").setExecutor( generalContractor ); + + getCommand("template").setExecutor( new TemplateCommand(this) ); LogintimeHandler logintimeHandler = new LogintimeHandler( this.getDataFolder() ); @@ -65,13 +74,14 @@ //pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer(), logintimeHandler.getConfig(), home.getConfig() ), Priority.Normal, this); //pm.registerEvent(Event.Type.CUSTOM_EVENT, new MessageListener(getServer()), Priority.Normal, this); - ApiBukkit api = (ApiBukkit) pm.getPlugin("ApiBukkit") ; + /*ApiBukkit api = (ApiBukkit) pm.getPlugin("ApiBukkit") ; if ( api != null) { StatusListener status = new StatusListener(this, getServer(), logintimeHandler.getConfig(), home.getConfig() ); - api.setRequestController("webstatus", status ); + //api.setRequestController("webstatus", status ); + ApiManager.getInstance().registerController( status ); } else { System.out.println("Could not find ApiBukkit"); - } + }*/