diff --git a/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java b/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java index e2547db..f7c19c8 100644 --- a/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java +++ b/src/main/java/net/limework/automaticlogdeleter/AutomaticLogDeleter.java @@ -20,12 +20,12 @@ public final class AutomaticLogDeleter extends JavaPlugin { @Override public void onDisable() { - new Thread(() -> { - FileConfiguration config = getConfig(); - if (config.getBoolean("also-delete-logs-on-shutdown")) { + FileConfiguration config = getConfig(); + if (config.getBoolean("also-delete-logs-on-shutdown")) { + new Thread(() -> { deleteLogs(); - } - }).start(); + }).start(); + } } public void deleteLogs() {