/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java
ViewVC logotype

Contents of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1602 - (show annotations) (download)
Mon Sep 26 13:04:40 2011 UTC (12 years, 7 months ago) by torben
File size: 3280 byte(s)
prevent endermen moving blocks around and when teleporting 1 player to another write a message to whoever issued the /tp
1 package dk.thoerup.bukkit.hoeruputils;
2
3
4 import org.bukkit.event.Event;
5 import org.bukkit.event.Event.Priority;
6 import org.bukkit.plugin.PluginManager;
7 import org.bukkit.plugin.java.JavaPlugin;
8
9 import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener;
10 import dk.thoerup.bukkit.hoeruputils.web.MessageListener;
11 import dk.thoerup.bukkit.hoeruputils.web.StatusListener;
12
13 public class HoerupUtilsPlugin extends JavaPlugin {
14
15 @Override
16 public void onDisable() {
17 // TODO Auto-generated method stub
18 }
19
20
21 @Override
22 public void onEnable() {
23 System.out.println("Loading HoerupUtils plugin");
24 getCommand("whereis").setExecutor(new WhereisCommand(getServer()));
25 //getCommand("mapgen").setExecutor(new MapgenCommand(this));
26 getCommand("eternalday").setExecutor(new EternalDayCommand(this));
27 getCommand("grass").setExecutor(new GrassCommand());
28 getCommand("getpos").setExecutor( new GetposCommand() );
29 getCommand("zapme").setExecutor( new ZapmeCommand() );
30 getCommand("zap").setExecutor( new ZapCommand() );
31 getCommand("msg").setExecutor( new MsgCommand( getServer() ) );
32 getCommand("stoner").setExecutor( new StonerCommand() );
33 getCommand("boom").setExecutor( new BoomCommand(this) );
34 getCommand("spawn").setExecutor( new SpawnCommand() );
35 getCommand("tp").setExecutor( new TeleportCommand() );
36
37 getCommand("wall").setExecutor( new WallCommand() );
38 getCommand("weather").setExecutor( new WeatherCommand() );
39
40
41 HomeCommand home = new HomeCommand(this);
42 getCommand("home").setExecutor( home );
43 getCommand("sethome").setExecutor( home );
44
45
46 PluginManager pm = getServer().getPluginManager();
47 //pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this);
48 //pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this);
49
50
51 pm.registerEvent(Event.Type.ENDERMAN_PICKUP, new EndermanStopper(), Priority.Normal, this);
52
53 //register web plugins
54 pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer()), Priority.Normal, this);
55 pm.registerEvent(Event.Type.CUSTOM_EVENT, new MessageListener(getServer()), Priority.Normal, this);
56
57
58 PowerMiner powerMiner = new PowerMiner();
59 pm.registerEvent(Event.Type.BLOCK_DAMAGE, powerMiner, Priority.Normal, this);
60 pm.registerEvent(Event.Type.PLAYER_QUIT, powerMiner.getPlayerQuitListener(), Priority.Normal, this);
61 getCommand("powerminer").setExecutor(powerMiner);
62
63
64 SuperMiner superMiner = new SuperMiner();
65 pm.registerEvent(Event.Type.BLOCK_DAMAGE, superMiner, Priority.Normal, this);
66 pm.registerEvent(Event.Type.PLAYER_QUIT, superMiner.getPlayerQuitListener(), Priority.Normal, this);
67 getCommand("superminer").setExecutor(superMiner);
68
69
70 //pm.registerEvent(Event.Type.PROJECTILE_HIT, new ExplosiveSnowballs(), Priority.Normal, this);
71
72
73 DoorBlockListener secretDoor = new DoorBlockListener(this);
74 pm.registerEvent(Event.Type.BLOCK_BREAK, secretDoor, Priority.Normal, this);
75 pm.registerEvent(Event.Type.SIGN_CHANGE, secretDoor, Priority.Normal, this);
76 pm.registerEvent(Event.Type.REDSTONE_CHANGE, secretDoor, Priority.Normal, this);
77 pm.registerEvent(Event.Type.PLAYER_INTERACT, secretDoor.getPlayerListener(), Priority.Normal, this);
78
79 }
80
81 }

  ViewVC Help
Powered by ViewVC 1.1.20