do not start new Thread too early

This commit is contained in:
Govindas 2021-06-12 14:47:13 +03:00
parent 9fc6a600ed
commit 0b4e780347
1 changed files with 5 additions and 5 deletions

View File

@ -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() {