Fixed a severe bug that crashed the plugin on start.

This commit is contained in:
Pascal Koenig
2011-09-18 23:41:44 +02:00
parent fca4b8c8cf
commit 045919558d
2 changed files with 7 additions and 2 deletions

View File

@@ -72,14 +72,16 @@ public class Webserver {
this.server = null; this.server = null;
this.address = new InetSocketAddress(port); this.address = new InetSocketAddress(port);
XmlStats.LogDebug("Opened socket on port "+port);
this.server = HttpServer.create(this.address, 0); this.server = HttpServer.create(this.address, 0);
XmlStats.LogDebug("Created webserver.");
this.server.createContext("/user_list.xml", new UserList()); this.server.createContext("/user_list.xml", new UserList());
XmlStats.LogDebug("Created context /user_list.xml.");
this.server.start(); this.server.start();
XmlStats.LogDebug("Started webserver.");
this.server.start();
} }
protected void startiConomy(){ protected void startiConomy(){

View File

@@ -50,10 +50,13 @@ public class XmlStats extends JavaPlugin {
this.enabled = false; this.enabled = false;
XmlStatsRegistry.flush(); XmlStatsRegistry.flush();
LogDebug("Registry flushed.");
webserverTemp.stop(); webserverTemp.stop();
LogDebug("Webserver stopped.");
getServer().getScheduler().cancelTasks(this); getServer().getScheduler().cancelTasks(this);
LogDebug("XmlStats killed.");
} }
LogInfo("Plugin Disabled"); LogInfo("Plugin Disabled");