/[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

revision 1942 by torben, Wed Mar 20 21:08:46 2013 UTC revision 3217 by torben, Sat Jan 6 14:31:05 2018 UTC
# Line 2  package dk.thoerup.bukkit.hoeruputils; Line 2  package dk.thoerup.bukkit.hoeruputils;
2    
3    
4  import java.net.InetSocketAddress;  import java.net.InetSocketAddress;
 import java.util.ArrayList;  
 import java.util.List;  
5  import java.util.logging.Level;  import java.util.logging.Level;
6    
7  import org.bukkit.plugin.PluginManager;  import org.bukkit.plugin.PluginManager;
# Line 11  import org.bukkit.plugin.java.JavaPlugin Line 9  import org.bukkit.plugin.java.JavaPlugin
9    
10  import com.sun.net.httpserver.HttpServer;  import com.sun.net.httpserver.HttpServer;
11    
 import dk.thoerup.bukkit.hoeruputils.chests.AdvancedChest;  
 import dk.thoerup.bukkit.hoeruputils.chests.ChestBean;  
12  import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands;  import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands;
 import dk.thoerup.bukkit.hoeruputils.message.MessageBean;  
 import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper;  
13  import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener;  import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener;
14  import dk.thoerup.bukkit.hoeruputils.web.BanListener;  import dk.thoerup.bukkit.hoeruputils.web.BanListener;
15  import dk.thoerup.bukkit.hoeruputils.web.StatusListener;  import dk.thoerup.bukkit.hoeruputils.web.StatusListener;
 import dk.thoerup.bukkit.hoeruputils.web.WebUser;  
 import dk.thoerup.bukkit.hoeruputils.web.WebUserCommand;  
16    
17    @SuppressWarnings("restriction")
18  public class HoerupUtilsPlugin extends JavaPlugin {  public class HoerupUtilsPlugin extends JavaPlugin {
19    
20          @Override          @Override
# Line 31  public class HoerupUtilsPlugin extends J Line 24  public class HoerupUtilsPlugin extends J
24                  }                  }
25          }          }
26                    
27          MessageWrapper messageWrapper;          //MessageWrapper messageWrapper;        //TODO: RE-ENABLE
28          HttpServer server = null;          HttpServer server = null;
29    
30                    
31          @Override          @Override
32          public void onEnable() {          public void onEnable() {
33                  System.out.println("Loading HoerupUtils plugin");                  System.out.println("Loading HoerupUtils plugin");
34                    
35                    //Ebean.getDefaultServer(); //TODO: RE-ENABLE
36                    
37                  getCommand("whereis").setExecutor(new WhereisCommand(getServer()));                  getCommand("whereis").setExecutor(new WhereisCommand(getServer()));
38                  //getCommand("mapgen").setExecutor(new MapgenCommand(this));                  //getCommand("mapgen").setExecutor(new MapgenCommand(this));
39                  getCommand("eternalday").setExecutor(new EternalDayCommand(this));                  getCommand("eternalday").setExecutor(new EternalDayCommand(this));
40                  getCommand("getpos").setExecutor( new GetposCommand() );                  getCommand("getpos").setExecutor( new GetposCommand() );
41                  getCommand("msg").setExecutor( new MsgCommand( this ) );                  getCommand("msg").setExecutor( new MsgCommand( this ) );
42                  getCommand("tp").setExecutor( new TeleportCommand() );  //              getCommand("tp").setExecutor( new TeleportCommand() );
43    
44                  getCommand("wall").setExecutor( new WallCommand() );                  getCommand("wall").setExecutor( new WallCommand() );
45                  getCommand("weather").setExecutor( new WeatherCommand() );                  getCommand("weather").setExecutor( new WeatherCommand() );
# Line 65  public class HoerupUtilsPlugin extends J Line 61  public class HoerupUtilsPlugin extends J
61                  getCommand("replay").setExecutor( generalContractor );                  getCommand("replay").setExecutor( generalContractor );
62                  getCommand("levelarea").setExecutor( generalContractor );                  getCommand("levelarea").setExecutor( generalContractor );
63                  getCommand("fillarea").setExecutor( generalContractor );                  getCommand("fillarea").setExecutor( generalContractor );
64                    getCommand("levelandfillarea").setExecutor( generalContractor );
65    
66                  getCommand("slopearea").setExecutor( generalContractor );                  getCommand("slopearea").setExecutor( generalContractor );
67                  getCommand("setsurface").setExecutor( generalContractor );                  getCommand("setsurface").setExecutor( generalContractor );
68                  getCommand("platform").setExecutor( generalContractor );                  getCommand("platform").setExecutor( generalContractor );
# Line 73  public class HoerupUtilsPlugin extends J Line 71  public class HoerupUtilsPlugin extends J
71                  getCommand("spawn").setExecutor( new SpawnCommand() );                  getCommand("spawn").setExecutor( new SpawnCommand() );
72                                    
73                  getCommand("template").setExecutor( new TemplateCommand(this) );                  getCommand("template").setExecutor( new TemplateCommand(this) );
74                    getCommand("regenerate").setExecutor( new RegenerateCommand() );
75    
76    
77                  LogintimeHandler logintimeHandler = new LogintimeHandler( this.getDataFolder() );                  LogintimeHandler logintimeHandler = new LogintimeHandler( this.getDataFolder() );
78                                    
# Line 83  public class HoerupUtilsPlugin extends J Line 83  public class HoerupUtilsPlugin extends J
83                  MotdHandler motd = new MotdHandler(this);                  MotdHandler motd = new MotdHandler(this);
84                  getCommand("motd").setExecutor( motd );                  getCommand("motd").setExecutor( motd );
85                  pm.registerEvents( motd, this);                  pm.registerEvents( motd, this);
86                    
87                    WayPoint wp = new WayPoint(this);
88                    getCommand("waypoint").setExecutor( wp );
89                    getCommand("setwaypoint").setExecutor( wp );
90                    pm.registerEvents( wp, this);
91    
92    
93                  pm.registerEvents(logintimeHandler, this);                  pm.registerEvents(logintimeHandler, this);
94                  pm.registerEvents(logintimeHandler, this);                  pm.registerEvents(logintimeHandler, this);
95    
96                                    
97                    
98                  pm.registerEvents(diver, this);                  pm.registerEvents(diver, this);
99    
100                  pm.registerEvents(new EndermanStopper(), this);                  pm.registerEvents(new EndermanStopper(), this);
# Line 101  public class HoerupUtilsPlugin extends J Line 107  public class HoerupUtilsPlugin extends J
107                  pm.registerEvents(chunks, this);                  pm.registerEvents(chunks, this);
108                  getCommand("stickychunk").setExecutor(chunks);                            getCommand("stickychunk").setExecutor(chunks);          
109                                    
110                    Mute mute = new Mute(this);
111                    pm.registerEvents(mute, this);
112                    getCommand("mute").setExecutor(mute);
113                    getCommand("unmute").setExecutor(mute);
114                    
115                                    
116                    // - fun/crazy/party elements
117                    pm.registerEvents(new ExplosiveSnowballs(), this);
118                    getCommand("zap").setExecutor( new ZapCommand() );
119                    
120                  Runnable ddlInstaller = new Runnable() {  /*
121                          @Override   * //TODO: RE-ENABLE
122                          public void run() {                  messageWrapper = new MessageWrapper(this);
                                 System.out.println("installddl");  
                                 installDDL();  
                         }  
                 };  
                 messageWrapper = new MessageWrapper(this, ddlInstaller);  
123                  pm.registerEvents( messageWrapper, this);                  pm.registerEvents( messageWrapper, this);
124                                                    
125                  AdvancedChest locked = new AdvancedChest(this, ddlInstaller);                  AdvancedChest locked = new AdvancedChest(this);
126                  getCommand("chest").setExecutor(locked);                  getCommand("chest").setExecutor(locked);
127                  pm.registerEvents( locked, this);                  pm.registerEvents( locked, this);
128                                    
129                                    
130                  getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) );                                              getCommand("webuser").setExecutor( new WebUserCommand(this) );                          
131    */
132                    
133                  //register web plugins                  //register web plugins
134                  //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);
# Line 163  public class HoerupUtilsPlugin extends J Line 172  public class HoerupUtilsPlugin extends J
172                    
173                    
174                    
175                    /*
176             * //TODO: RE-ENABLE
177          public MessageWrapper getMessageWrapper() {          public MessageWrapper getMessageWrapper() {
178                  return messageWrapper;                  return messageWrapper;
179          }          }
180            */
181    
         //@SuppressWarnings({ "unchecked", "rawtypes" })  
         @Override  
         public List<Class<?>> getDatabaseClasses() {  
                 List<Class<?>> list = new ArrayList<Class<?>>();  
182    
183                  list.add(MessageBean.class);          
                 list.add(ChestBean.class);  
                 list.add(WebUser.class);  
   
                 return list;  
         }  
184    
185            /*
186          private void deprecated() {          private void deprecated() {
187  /*  
188                  getCommand("stoner").setExecutor( new StonerCommand() );                  getCommand("stoner").setExecutor( new StonerCommand() );
189                  getCommand("spawn").setExecutor( new SpawnCommand() );                  getCommand("spawn").setExecutor( new SpawnCommand() );
190                  getCommand("boom").setExecutor( new BoomCommand(this) );                  getCommand("boom").setExecutor( new BoomCommand(this) );
# Line 207  public class HoerupUtilsPlugin extends J Line 210  public class HoerupUtilsPlugin extends J
210                  //pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this);                  //pm.registerEvent(Event.Type.PLAYER_RESPAWN, new RespawnHandler(this), Priority.Normal, this);
211                  //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);              
212    
213  */  
214          }          }
215            */
216    
217  }  }

Legend:
Removed from v.1942  
changed lines
  Added in v.3217

  ViewVC Help
Powered by ViewVC 1.1.20