From 71fb54760495c5ebba94e160b3664b1460ab45e6 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 12 Oct 2021 16:53:50 +0200 Subject: [PATCH] Revert "Test schedule sync shutdown" This reverts commit 8e3bba677ea22a41d2ed8574e8e49c352db14076. --- .../bausystem/features/world/AutoShutdownListener.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/AutoShutdownListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/world/AutoShutdownListener.java index 667233d7..be994a49 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/AutoShutdownListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/world/AutoShutdownListener.java @@ -65,24 +65,20 @@ public class AutoShutdownListener implements Listener { @Override public void run() { if (count >= 300) { - scheduleSyncShutdown(); + Bukkit.shutdown(); return; } try { if (RamUsage.getUsage() > 0.8) { - scheduleSyncShutdown(); + Bukkit.shutdown(); } } catch (Throwable throwable) { Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable); - scheduleSyncShutdown(); + Bukkit.shutdown(); } count++; } }, 20, 20); } } - - private void scheduleSyncShutdown() { - Bukkit.getScheduler().runTask(BauSystem.getInstance(), Bukkit::shutdown); - } }