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; |
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; |
13 |
import dk.thoerup.bukkit.hoeruputils.message.MessageBean; |
import dk.thoerup.bukkit.hoeruputils.deprecated.ExplosiveSnowballs; |
14 |
import dk.thoerup.bukkit.hoeruputils.message.MessageWrapper; |
import dk.thoerup.bukkit.hoeruputils.deprecated.ZapCommand; |
15 |
import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; |
import dk.thoerup.bukkit.hoeruputils.secretdoor.DoorBlockListener; |
16 |
import dk.thoerup.bukkit.hoeruputils.web.BanListener; |
import dk.thoerup.bukkit.hoeruputils.web.BanListener; |
17 |
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; |
|
|
import io.ebean.Ebean; |
|
18 |
|
|
19 |
@SuppressWarnings("restriction") |
@SuppressWarnings("restriction") |
20 |
public class HoerupUtilsPlugin extends JavaPlugin { |
public class HoerupUtilsPlugin extends JavaPlugin { |
26 |
} |
} |
27 |
} |
} |
28 |
|
|
29 |
MessageWrapper messageWrapper; |
//MessageWrapper messageWrapper; //TODO: RE-ENABLE |
30 |
HttpServer server = null; |
HttpServer server = null; |
31 |
|
|
32 |
|
|
34 |
public void onEnable() { |
public void onEnable() { |
35 |
System.out.println("Loading HoerupUtils plugin"); |
System.out.println("Loading HoerupUtils plugin"); |
36 |
|
|
37 |
Ebean.getDefaultServer(); |
//Ebean.getDefaultServer(); //TODO: RE-ENABLE |
38 |
|
|
39 |
getCommand("whereis").setExecutor(new WhereisCommand(getServer())); |
getCommand("whereis").setExecutor(new WhereisCommand(getServer())); |
40 |
//getCommand("mapgen").setExecutor(new MapgenCommand(this)); |
//getCommand("mapgen").setExecutor(new MapgenCommand(this)); |
96 |
pm.registerEvents(logintimeHandler, this); |
pm.registerEvents(logintimeHandler, this); |
97 |
|
|
98 |
|
|
99 |
|
|
100 |
pm.registerEvents(diver, this); |
pm.registerEvents(diver, this); |
101 |
|
|
102 |
pm.registerEvents(new EndermanStopper(), this); |
pm.registerEvents(new EndermanStopper(), this); |
114 |
getCommand("mute").setExecutor(mute); |
getCommand("mute").setExecutor(mute); |
115 |
getCommand("unmute").setExecutor(mute); |
getCommand("unmute").setExecutor(mute); |
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
getCommand("fillchest").setExecutor( new ChestFiller() ); |
120 |
|
|
121 |
|
|
122 |
|
// - fun/crazy/party elements |
123 |
|
pm.registerEvents(new ExplosiveSnowballs(), this); |
124 |
|
getCommand("zap").setExecutor( new ZapCommand() ); |
125 |
|
|
126 |
|
/* |
127 |
|
* //TODO: RE-ENABLE |
128 |
messageWrapper = new MessageWrapper(this); |
messageWrapper = new MessageWrapper(this); |
129 |
pm.registerEvents( messageWrapper, this); |
pm.registerEvents( messageWrapper, this); |
130 |
|
|
134 |
|
|
135 |
|
|
136 |
getCommand("webuser").setExecutor( new WebUserCommand(this) ); |
getCommand("webuser").setExecutor( new WebUserCommand(this) ); |
137 |
|
*/ |
138 |
|
|
139 |
//register web plugins |
//register web plugins |
140 |
//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); |
178 |
|
|
179 |
|
|
180 |
|
|
181 |
|
/* |
182 |
|
* //TODO: RE-ENABLE |
183 |
public MessageWrapper getMessageWrapper() { |
public MessageWrapper getMessageWrapper() { |
184 |
return messageWrapper; |
return messageWrapper; |
185 |
} |
} |
186 |
|
*/ |
187 |
|
|
188 |
|
|
189 |
|
|