--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2011/06/24 11:13:59 1522 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2011/12/09 17:06:52 1653 @@ -6,6 +6,7 @@ import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; +import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; import dk.thoerup.bukkit.hoeruputils.web.MessageListener; import dk.thoerup.bukkit.hoeruputils.web.StatusListener; @@ -21,37 +22,72 @@ public void onEnable() { System.out.println("Loading HoerupUtils plugin"); getCommand("whereis").setExecutor(new WhereisCommand(getServer())); - getCommand("mapgen").setExecutor(new MapgenCommand(this)); + //getCommand("mapgen").setExecutor(new MapgenCommand(this)); getCommand("eternalday").setExecutor(new EternalDayCommand(this)); - getCommand("grass").setExecutor(new GrassCommand()); getCommand("getpos").setExecutor( new GetposCommand() ); - getCommand("zapme").setExecutor( new ZapmeCommand() ); - getCommand("zap").setExecutor( new ZapCommand() ); getCommand("msg").setExecutor( new MsgCommand( getServer() ) ); - getCommand("stoner").setExecutor( new StonerCommand() ); - getCommand("boom").setExecutor( new BoomCommand(this) ); getCommand("spawn").setExecutor( new SpawnCommand() ); + getCommand("tp").setExecutor( new TeleportCommand() ); + + getCommand("wall").setExecutor( new WallCommand() ); + getCommand("weather").setExecutor( new WeatherCommand() ); + + + HomeCommand home = new HomeCommand(this); + getCommand("home").setExecutor( home ); + getCommand("sethome").setExecutor( home ); + PluginManager pm = getServer().getPluginManager(); - pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this); - pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this); + //pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this); + //pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this); + + + pm.registerEvent(Event.Type.ENDERMAN_PICKUP, new EndermanStopper(), Priority.Normal, this); //register web plugins pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer()), Priority.Normal, this); pm.registerEvent(Event.Type.CUSTOM_EVENT, new MessageListener(getServer()), Priority.Normal, this); + + + + + + + DoorBlockListener secretDoor = new DoorBlockListener(this); + pm.registerEvent(Event.Type.BLOCK_BREAK, secretDoor, Priority.Normal, this); + pm.registerEvent(Event.Type.SIGN_CHANGE, secretDoor, Priority.Normal, this); + pm.registerEvent(Event.Type.REDSTONE_CHANGE, secretDoor, Priority.Normal, this); + pm.registerEvent(Event.Type.PLAYER_INTERACT, secretDoor.getPlayerListener(), Priority.Normal, this); + + } + + private void deprecated() { +/* + getCommand("stoner").setExecutor( new StonerCommand() ); + getCommand("boom").setExecutor( new BoomCommand(this) ); + getCommand("grass").setExecutor(new GrassCommand()); + + getCommand("zapme").setExecutor( new ZapmeCommand() ); + getCommand("zap").setExecutor( new ZapCommand() ); + + PowerMiner powerMiner = new PowerMiner(); pm.registerEvent(Event.Type.BLOCK_DAMAGE, powerMiner, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_QUIT, powerMiner.getPlayerQuitListener(), Priority.Normal, this); getCommand("powerminer").setExecutor(powerMiner); - SuperMiner superMiner = new SuperMiner(); pm.registerEvent(Event.Type.BLOCK_DAMAGE, superMiner, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_QUIT, superMiner.getPlayerQuitListener(), Priority.Normal, this); getCommand("superminer").setExecutor(superMiner); - + + + //pm.registerEvent(Event.Type.PROJECTILE_HIT, new ExplosiveSnowballs(), Priority.Normal, this); + +*/ } }