mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-29 12:37:53 +01:00
Fixes #860
This commit is contained in:
parent
7a9ed0f512
commit
199eea5d9f
@ -78,4 +78,9 @@ public class BukkitMain extends JavaPlugin {
|
|||||||
Bukkit.getPluginManager().enablePlugin(toLoad);
|
Bukkit.getPluginManager().enablePlugin(toLoad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisable() {
|
||||||
|
Fawe.get().onDisable();
|
||||||
|
}
|
||||||
}
|
}
|
@ -150,6 +150,8 @@ public class Fawe {
|
|||||||
private DefaultTransformParser transformParser;
|
private DefaultTransformParser transformParser;
|
||||||
private ChatManager chatManager = new PlainChatManager();
|
private ChatManager chatManager = new PlainChatManager();
|
||||||
|
|
||||||
|
private BStats stats;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the implementation specific class
|
* Get the implementation specific class
|
||||||
*
|
*
|
||||||
@ -222,7 +224,7 @@ public class Fawe {
|
|||||||
TaskManager.IMP = this.IMP.getTaskManager();
|
TaskManager.IMP = this.IMP.getTaskManager();
|
||||||
if (Settings.IMP.METRICS) {
|
if (Settings.IMP.METRICS) {
|
||||||
try {
|
try {
|
||||||
BStats stats = new BStats();
|
this.stats = new BStats();
|
||||||
this.IMP.startMetrics();
|
this.IMP.startMetrics();
|
||||||
TaskManager.IMP.later(new Runnable() {
|
TaskManager.IMP.later(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -277,6 +279,12 @@ public class Fawe {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onDisable() {
|
||||||
|
if (stats != null) {
|
||||||
|
stats.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean update() {
|
private boolean update() {
|
||||||
if (updater != null) {
|
if (updater != null) {
|
||||||
updater.getUpdate(IMP.getPlatform(), getVersion());
|
updater.getUpdate(IMP.getPlatform(), getVersion());
|
||||||
|
Loading…
Reference in New Issue
Block a user