--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2013/03/20 16:27:21 1939 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/HoerupUtilsPlugin.java 2018/01/06 14:31:05 3217 @@ -2,8 +2,6 @@ import java.net.InetSocketAddress; -import java.util.ArrayList; -import java.util.List; import java.util.logging.Level; import org.bukkit.plugin.PluginManager; @@ -11,17 +9,12 @@ import com.sun.net.httpserver.HttpServer; -import dk.thoerup.bukkit.hoeruputils.chests.AdvancedChest; -import dk.thoerup.bukkit.hoeruputils.chests.ChestBean; import dk.thoerup.bukkit.hoeruputils.creative.GeneralContractorCommands; -import dk.thoerup.bukkit.hoeruputils.message.MessageBean; -import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper; import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; import dk.thoerup.bukkit.hoeruputils.web.BanListener; import dk.thoerup.bukkit.hoeruputils.web.StatusListener; -import dk.thoerup.bukkit.hoeruputils.web.WebUser; -import dk.thoerup.bukkit.hoeruputils.web.WebUserCommand; +@SuppressWarnings("restriction") public class HoerupUtilsPlugin extends JavaPlugin { @Override @@ -31,19 +24,22 @@ } } - MessageWrapper messageWrapper; + //MessageWrapper messageWrapper; //TODO: RE-ENABLE HttpServer server = null; @Override public void onEnable() { System.out.println("Loading HoerupUtils plugin"); + + //Ebean.getDefaultServer(); //TODO: RE-ENABLE + getCommand("whereis").setExecutor(new WhereisCommand(getServer())); //getCommand("mapgen").setExecutor(new MapgenCommand(this)); getCommand("eternalday").setExecutor(new EternalDayCommand(this)); getCommand("getpos").setExecutor( new GetposCommand() ); getCommand("msg").setExecutor( new MsgCommand( this ) ); - getCommand("tp").setExecutor( new TeleportCommand() ); +// getCommand("tp").setExecutor( new TeleportCommand() ); getCommand("wall").setExecutor( new WallCommand() ); getCommand("weather").setExecutor( new WeatherCommand() ); @@ -65,6 +61,8 @@ getCommand("replay").setExecutor( generalContractor ); getCommand("levelarea").setExecutor( generalContractor ); getCommand("fillarea").setExecutor( generalContractor ); + getCommand("levelandfillarea").setExecutor( generalContractor ); + getCommand("slopearea").setExecutor( generalContractor ); getCommand("setsurface").setExecutor( generalContractor ); getCommand("platform").setExecutor( generalContractor ); @@ -73,6 +71,8 @@ getCommand("spawn").setExecutor( new SpawnCommand() ); getCommand("template").setExecutor( new TemplateCommand(this) ); + getCommand("regenerate").setExecutor( new RegenerateCommand() ); + LogintimeHandler logintimeHandler = new LogintimeHandler( this.getDataFolder() ); @@ -83,12 +83,18 @@ MotdHandler motd = new MotdHandler(this); getCommand("motd").setExecutor( motd ); pm.registerEvents( motd, this); + + WayPoint wp = new WayPoint(this); + getCommand("waypoint").setExecutor( wp ); + getCommand("setwaypoint").setExecutor( wp ); + pm.registerEvents( wp, this); pm.registerEvents(logintimeHandler, this); pm.registerEvents(logintimeHandler, this); + pm.registerEvents(diver, this); pm.registerEvents(new EndermanStopper(), this); @@ -97,28 +103,32 @@ pm.registerEvents(jail, this); getCommand("jail").setExecutor( jail ); + StickyChunk chunks = new StickyChunk(); + pm.registerEvents(chunks, this); + getCommand("stickychunk").setExecutor(chunks); + + Mute mute = new Mute(this); + pm.registerEvents(mute, this); + getCommand("mute").setExecutor(mute); + getCommand("unmute").setExecutor(mute); - - + // - fun/crazy/party elements + pm.registerEvents(new ExplosiveSnowballs(), this); + getCommand("zap").setExecutor( new ZapCommand() ); - Runnable ddlInstaller = new Runnable() { - @Override - public void run() { - System.out.println("installddl"); - installDDL(); - } - }; - messageWrapper = new MessageWrapper(this, ddlInstaller); +/* + * //TODO: RE-ENABLE + messageWrapper = new MessageWrapper(this); pm.registerEvents( messageWrapper, this); - AdvancedChest locked = new AdvancedChest(this, ddlInstaller); + AdvancedChest locked = new AdvancedChest(this); getCommand("chest").setExecutor(locked); pm.registerEvents( locked, this); - getCommand("webuser").setExecutor( new WebUserCommand(this,ddlInstaller) ); - + getCommand("webuser").setExecutor( new WebUserCommand(this) ); +*/ //register web plugins //pm.registerEvent(Event.Type.CUSTOM_EVENT, new StatusListener(getServer(), logintimeHandler.getConfig(), home.getConfig() ), Priority.Normal, this); @@ -162,25 +172,19 @@ - + /* + * //TODO: RE-ENABLE public MessageWrapper getMessageWrapper() { return messageWrapper; } + */ - //@SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public List> getDatabaseClasses() { - List> list = new ArrayList>(); - list.add(MessageBean.class); - list.add(ChestBean.class); - list.add(WebUser.class); - - return list; - } + + /* private void deprecated() { -/* + getCommand("stoner").setExecutor( new StonerCommand() ); getCommand("spawn").setExecutor( new SpawnCommand() ); getCommand("boom").setExecutor( new BoomCommand(this) ); @@ -206,7 +210,8 @@ //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); -*/ + } + */ }