This commit is contained in:
Jesse Boyd 2018-05-02 09:21:54 +10:00
parent 7a9ed0f512
commit 199eea5d9f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 14 additions and 1 deletions

View File

@ -78,4 +78,9 @@ public class BukkitMain extends JavaPlugin {
Bukkit.getPluginManager().enablePlugin(toLoad);
}
}
@Override
public void onDisable() {
Fawe.get().onDisable();
}
}

View File

@ -150,6 +150,8 @@ public class Fawe {
private DefaultTransformParser transformParser;
private ChatManager chatManager = new PlainChatManager();
private BStats stats;
/**
* Get the implementation specific class
*
@ -222,7 +224,7 @@ public class Fawe {
TaskManager.IMP = this.IMP.getTaskManager();
if (Settings.IMP.METRICS) {
try {
BStats stats = new BStats();
this.stats = new BStats();
this.IMP.startMetrics();
TaskManager.IMP.later(new Runnable() {
@Override
@ -277,6 +279,12 @@ public class Fawe {
}
}
public void onDisable() {
if (stats != null) {
stats.close();
}
}
private boolean update() {
if (updater != null) {
updater.getUpdate(IMP.getPlatform(), getVersion());