diff --git a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java index 6fa28d8c..813e8db6 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/xginko/aef/AnarchyExploitFixes.java @@ -158,9 +158,9 @@ public void onDisable() { AEFListener.LISTENERS.clear(); PacketEvents.getAPI().terminate(); } - if (metrics != null) { - metrics.shutdown(); - metrics = null; + if (languageCacheMap != null) { + languageCacheMap.clear(); + languageCacheMap = null; } if (cachingPermTool != null) { cachingPermTool.disable(); @@ -170,11 +170,14 @@ public void onDisable() { tickReporter.disable(); tickReporter = null; } + if (metrics != null) { + metrics.shutdown(); + metrics = null; + } + unPrefixedLogger = null; + prefixedLogger = null; instance = null; config = null; - languageCacheMap = null; - prefixedLogger = null; - unPrefixedLogger = null; } public static AnarchyExploitFixes getInstance() { diff --git a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java index 13857463..d47ce809 100755 --- a/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java +++ b/AnarchyExploitFixesLegacy/src/main/java/me/xginko/aef/AnarchyExploitFixes.java @@ -159,9 +159,9 @@ public void onDisable() { AEFModule.ENABLED_MODULES.clear(); PacketEvents.getAPI().terminate(); } - if (metrics != null) { - metrics.shutdown(); - metrics = null; + if (languageCacheMap != null) { + languageCacheMap.clear(); + languageCacheMap = null; } if (cachingPermTool != null) { cachingPermTool.disable(); @@ -175,11 +175,14 @@ public void onDisable() { datastore.disable(); datastore = null; } + if (metrics != null) { + metrics.shutdown(); + metrics = null; + } + unPrefixedLogger = null; + prefixedLogger = null; instance = null; config = null; - languageCacheMap = null; - prefixedLogger = null; - unPrefixedLogger = null; } public static AnarchyExploitFixes getInstance() {