43 |
getCommand("eternalday").setExecutor(new EternalDayCommand(this)); |
getCommand("eternalday").setExecutor(new EternalDayCommand(this)); |
44 |
getCommand("getpos").setExecutor( new GetposCommand() ); |
getCommand("getpos").setExecutor( new GetposCommand() ); |
45 |
getCommand("msg").setExecutor( new MsgCommand( this ) ); |
getCommand("msg").setExecutor( new MsgCommand( this ) ); |
46 |
getCommand("tp").setExecutor( new TeleportCommand() ); |
// getCommand("tp").setExecutor( new TeleportCommand() ); |
47 |
|
|
48 |
getCommand("wall").setExecutor( new WallCommand() ); |
getCommand("wall").setExecutor( new WallCommand() ); |
49 |
getCommand("weather").setExecutor( new WeatherCommand() ); |
getCommand("weather").setExecutor( new WeatherCommand() ); |
65 |
getCommand("replay").setExecutor( generalContractor ); |
getCommand("replay").setExecutor( generalContractor ); |
66 |
getCommand("levelarea").setExecutor( generalContractor ); |
getCommand("levelarea").setExecutor( generalContractor ); |
67 |
getCommand("fillarea").setExecutor( generalContractor ); |
getCommand("fillarea").setExecutor( generalContractor ); |
68 |
|
getCommand("levelandfillarea").setExecutor( generalContractor ); |
69 |
|
|
70 |
getCommand("slopearea").setExecutor( generalContractor ); |
getCommand("slopearea").setExecutor( generalContractor ); |
71 |
getCommand("setsurface").setExecutor( generalContractor ); |
getCommand("setsurface").setExecutor( generalContractor ); |
72 |
getCommand("platform").setExecutor( generalContractor ); |
getCommand("platform").setExecutor( generalContractor ); |
75 |
getCommand("spawn").setExecutor( new SpawnCommand() ); |
getCommand("spawn").setExecutor( new SpawnCommand() ); |
76 |
|
|
77 |
getCommand("template").setExecutor( new TemplateCommand(this) ); |
getCommand("template").setExecutor( new TemplateCommand(this) ); |
78 |
|
getCommand("regenerate").setExecutor( new RegenerateCommand() ); |
79 |
|
|
80 |
|
|
81 |
LogintimeHandler logintimeHandler = new LogintimeHandler( this.getDataFolder() ); |
LogintimeHandler logintimeHandler = new LogintimeHandler( this.getDataFolder() ); |
82 |
|
|
87 |
MotdHandler motd = new MotdHandler(this); |
MotdHandler motd = new MotdHandler(this); |
88 |
getCommand("motd").setExecutor( motd ); |
getCommand("motd").setExecutor( motd ); |
89 |
pm.registerEvents( motd, this); |
pm.registerEvents( motd, this); |
90 |
|
|
91 |
|
WayPoint wp = new WayPoint(this); |
92 |
|
getCommand("waypoint").setExecutor( wp ); |
93 |
|
getCommand("setwaypoint").setExecutor( wp ); |
94 |
|
pm.registerEvents( wp, this); |
95 |
|
|
96 |
|
|
97 |
pm.registerEvents(logintimeHandler, this); |
pm.registerEvents(logintimeHandler, this); |
106 |
pm.registerEvents(jail, this); |
pm.registerEvents(jail, this); |
107 |
getCommand("jail").setExecutor( jail ); |
getCommand("jail").setExecutor( jail ); |
108 |
|
|
109 |
|
StickyChunk chunks = new StickyChunk(); |
110 |
|
pm.registerEvents(chunks, this); |
111 |
|
getCommand("stickychunk").setExecutor(chunks); |
112 |
|
|
113 |
|
Mute mute = new Mute(this); |
114 |
|
pm.registerEvents(mute, this); |
115 |
|
getCommand("mute").setExecutor(mute); |
116 |
|
getCommand("unmute").setExecutor(mute); |
117 |
|
|
118 |
|
|
119 |
Runnable ddlInstaller = new Runnable() { |
Runnable ddlInstaller = new Runnable() { |
154 |
}*/ |
}*/ |
155 |
|
|
156 |
try { |
try { |
157 |
InetSocketAddress adr = new InetSocketAddress("localhost", 9999); |
InetSocketAddress adr = new InetSocketAddress("127.0.0.1", 9999); |
158 |
HttpServer.create(adr, 10); |
server = HttpServer.create(adr, 20); |
159 |
server.createContext("/bans", new BanListener(this, getServer()) ); |
server.createContext("/bans", new BanListener(this, getServer()) ); |
160 |
server.createContext("/webstatus", new StatusListener(this, getServer(),logintimeHandler.getConfig(), home.getConfig()) ); |
server.createContext("/webstatus", new StatusListener(this, getServer(),logintimeHandler.getConfig(), home.getConfig()) ); |
161 |
|
server.start(); |
162 |
|
|
163 |
} catch(Exception e) { |
} catch(Exception e) { |
164 |
getLogger().log(Level.SEVERE, "Error loading webserver", e); |
getLogger().log(Level.SEVERE, "Error loading webserver", e); |