Skip to content

Commit

Permalink
clear map on disable
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Aug 2, 2024
1 parent 7db0ce3 commit c4a51a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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() {
Expand Down

0 comments on commit c4a51a0

Please sign in to comment.