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

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

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

miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java revision 1671 by torben, Thu Dec 22 20:30:28 2011 UTC miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java revision 1695 by torben, Mon Feb 27 14:54:56 2012 UTC
# Line 2  package dk.thoerup.bukkit.hoeruputils; Line 2  package dk.thoerup.bukkit.hoeruputils;
2    
3    
4  import org.bukkit.event.Event;  import org.bukkit.event.Event;
 import org.bukkit.event.Event.Priority;  
5  import org.bukkit.plugin.PluginManager;  import org.bukkit.plugin.PluginManager;
6  import org.bukkit.plugin.java.JavaPlugin;  import org.bukkit.plugin.java.JavaPlugin;
7    
# Line 11  import dk.thoerup.bukkit.hoeruputils.sec Line 10  import dk.thoerup.bukkit.hoeruputils.sec
10  import dk.thoerup.bukkit.hoeruputils.web.MessageListener;  import dk.thoerup.bukkit.hoeruputils.web.MessageListener;
11  import dk.thoerup.bukkit.hoeruputils.web.StatusListener;  import dk.thoerup.bukkit.hoeruputils.web.StatusListener;
12    
13    
14    import de.codeinfection.quickwango.ApiBukkit.ApiBukkit;
15    import de.codeinfection.quickwango.ApiBukkit.ApiServer.ApiManager;
16    
17  public class HoerupUtilsPlugin extends JavaPlugin {  public class HoerupUtilsPlugin extends JavaPlugin {
18    
19          @Override          @Override
# Line 32  public class HoerupUtilsPlugin extends J Line 35  public class HoerupUtilsPlugin extends J
35                  getCommand("wall").setExecutor( new WallCommand() );                  getCommand("wall").setExecutor( new WallCommand() );
36                  getCommand("weather").setExecutor( new WeatherCommand() );                  getCommand("weather").setExecutor( new WeatherCommand() );
37    
38                    getCommand("gc").setExecutor( new GcCommand() );
39    
40    
41                  HomeCommand home = new HomeCommand(this);                  HomeCommand home = new HomeCommand(this);
42                  getCommand("home").setExecutor( home );                  getCommand("home").setExecutor( home );
# Line 45  public class HoerupUtilsPlugin extends J Line 50  public class HoerupUtilsPlugin extends J
50                                    
51                                    
52                  PluginManager pm = getServer().getPluginManager();                  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);                
53    
54    
55                  pm.registerEvent(Event.Type.PLAYER_LOGIN, logintimeHandler, Priority.Normal, this);                  pm.registerEvents(logintimeHandler, this);
56                  pm.registerEvent(Event.Type.PLAYER_QUIT, logintimeHandler, Priority.Normal, this);                  pm.registerEvents(logintimeHandler, this);
57    
58                                    
59                  pm.registerEvent(Event.Type.PLAYER_QUIT, diver.getQuitHandler(), Priority.Normal, this);                  pm.registerEvents(diver, this);
60    
61    
62                  pm.registerEvent(Event.Type.ENDERMAN_PICKUP, new EndermanStopper(), Priority.Normal, this);                              pm.registerEvents(new EndermanStopper(), this);        
63                    
64                    
65                  //register web plugins                  //register web plugins
66                  pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer(), logintimeHandler.getConfig(), home.getConfig() ), Priority.Normal, this);                  //pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer(), logintimeHandler.getConfig(), home.getConfig() ), Priority.Normal, this);
67                  pm.registerEvent(Event.Type.CUSTOM_EVENT, new MessageListener(getServer()), Priority.Normal, this);                  //pm.registerEvent(Event.Type.CUSTOM_EVENT, new MessageListener(getServer()), Priority.Normal, this);
68    
69                    ApiBukkit api = (ApiBukkit) pm.getPlugin("ApiBukkit") ;
70                    if ( api != null) {
71                            StatusListener status = new StatusListener(this, getServer(), logintimeHandler.getConfig(), home.getConfig() );
72                            //api.setRequestController("webstatus", status );
73                            ApiManager.getInstance().registerController( status );
74                    } else {
75                            System.out.println("Could not find ApiBukkit");
76                    }
77                                    
78                                    
79    
   
   
   
   
80                                    
81                  DoorBlockListener secretDoor = new DoorBlockListener(this);                  DoorBlockListener secretDoor = new DoorBlockListener(this);
82                  pm.registerEvent(Event.Type.BLOCK_BREAK, secretDoor, Priority.Normal, this);                  pm.registerEvents(secretDoor, this);
83                  pm.registerEvent(Event.Type.SIGN_CHANGE, secretDoor, Priority.Normal, this);                  pm.registerEvents(secretDoor.getPlayerListener(), this);
                 pm.registerEvent(Event.Type.REDSTONE_CHANGE, secretDoor, Priority.Normal, this);  
                 pm.registerEvent(Event.Type.PLAYER_INTERACT, secretDoor.getPlayerListener(), Priority.Normal, this);  
84                                    
85          }          }
86    
# Line 102  public class HoerupUtilsPlugin extends J Line 108  public class HoerupUtilsPlugin extends J
108    
109                  //pm.registerEvent(Event.Type.PROJECTILE_HIT, new ExplosiveSnowballs(), Priority.Normal, this);                  //pm.registerEvent(Event.Type.PROJECTILE_HIT, new ExplosiveSnowballs(), Priority.Normal, this);
110    
111                    //pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this);
112                    //pm.registerEvent(Event.Type.ENTITY_DEATH, new RespawnHandler.PlayerDeathListener(this.getDataFolder()), Priority.Normal, this);              
113    
114  */  */
115          }          }
116    

Legend:
Removed from v.1671  
changed lines
  Added in v.1695

  ViewVC Help
Powered by ViewVC 1.1.20