Fixed a severe bug that crashed the plugin on start.
This commit is contained in:
@@ -72,14 +72,16 @@ public class Webserver {
|
||||
this.server = null;
|
||||
|
||||
this.address = new InetSocketAddress(port);
|
||||
XmlStats.LogDebug("Opened socket on port "+port);
|
||||
|
||||
this.server = HttpServer.create(this.address, 0);
|
||||
XmlStats.LogDebug("Created webserver.");
|
||||
|
||||
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.");
|
||||
}
|
||||
|
||||
protected void startiConomy(){
|
||||
|
||||
@@ -50,10 +50,13 @@ public class XmlStats extends JavaPlugin {
|
||||
this.enabled = false;
|
||||
|
||||
XmlStatsRegistry.flush();
|
||||
LogDebug("Registry flushed.");
|
||||
|
||||
webserverTemp.stop();
|
||||
LogDebug("Webserver stopped.");
|
||||
|
||||
getServer().getScheduler().cancelTasks(this);
|
||||
LogDebug("XmlStats killed.");
|
||||
|
||||
}
|
||||
LogInfo("Plugin Disabled");
|
||||
|
||||
Reference in New Issue
Block a user