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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1240 by torben, Tue Mar 22 19:50:46 2011 UTC revision 1520 by torben, Mon Jun 20 16:33:38 2011 UTC
# Line 6  import org.bukkit.event.Event.Priority; Line 6  import org.bukkit.event.Event.Priority;
6  import org.bukkit.plugin.PluginManager;  import org.bukkit.plugin.PluginManager;
7  import org.bukkit.plugin.java.JavaPlugin;  import org.bukkit.plugin.java.JavaPlugin;
8    
9    import dk.thoerup.bukkit.hoeruputils.web.MessageListener;
10    import dk.thoerup.bukkit.hoeruputils.web.StatusListener;
11    
12  public class HoerupUtilsPlugin extends JavaPlugin {  public class HoerupUtilsPlugin extends JavaPlugin {
13    
14          @Override          @Override
# Line 19  public class HoerupUtilsPlugin extends J Line 22  public class HoerupUtilsPlugin extends J
22                  System.out.println("Loading HoerupUtils plugin");                  System.out.println("Loading HoerupUtils plugin");
23                  getCommand("whereis").setExecutor(new WhereisCommand(getServer()));                  getCommand("whereis").setExecutor(new WhereisCommand(getServer()));
24                  getCommand("mapgen").setExecutor(new MapgenCommand(this));                  getCommand("mapgen").setExecutor(new MapgenCommand(this));
25                    getCommand("eternalday").setExecutor(new EternalDayCommand(this));
26                    getCommand("grass").setExecutor(new GrassCommand());
27                    getCommand("getpos").setExecutor( new GetposCommand() );
28                    getCommand("zapme").setExecutor( new ZapmeCommand() );
29                    getCommand("zap").setExecutor( new ZapCommand() );
30                    getCommand("msg").setExecutor( new MsgCommand( getServer() ) );
31                    getCommand("stoner").setExecutor( new StonerCommand() );
32                    getCommand("boom").setExecutor( new BoomCommand(this) );
33                    getCommand("spawn").setExecutor( new SpawnCommand() );
34                                    
35                  PluginManager pm = getServer().getPluginManager();                  PluginManager pm = getServer().getPluginManager();
36                  pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this);                  pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this);
37                  pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this);                  pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this);        
38                    
39                    //register web plugins
40                    pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer()), Priority.Normal, this);
41                    pm.registerEvent(Event.Type.CUSTOM_EVENT, new MessageListener(getServer()), Priority.Normal, this);
42                    
43                                    
44                  this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new PeriodicStatusSaver(getServer()), 10*20, 2*60*20);                  PowerMiner powerMiner = new PowerMiner();
45                    pm.registerEvent(Event.Type.BLOCK_DAMAGE, powerMiner, Priority.Normal, this);
46                    pm.registerEvent(Event.Type.PLAYER_QUIT, powerMiner.getPlayerQuitListener(), Priority.Normal, this);
47                    getCommand("powerminer").setExecutor(powerMiner);
48          }          }
49    
50  }  }

Legend:
Removed from v.1240  
changed lines
  Added in v.1520

  ViewVC Help
Powered by ViewVC 1.1.20