Fix NPE when metrics has been opted out of

This commit is contained in:
fullwall 2012-11-07 10:09:13 +08:00
parent a6950dd9d8
commit 3faa57ee70

View File

@ -187,7 +187,8 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
Bukkit.getPluginManager().callEvent(new CitizensDisableEvent());
Editor.leaveAll();
CitizensAPI.shutdown();
metrics.stop();
if (metrics != null)
metrics.stop();
tearDownScripting();
// Don't bother with this part if MC versions are not compatible