From 3cdff4c4b79247934c1d856801a83bb39c14b940 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 3 Apr 2021 09:10:04 +0200 Subject: [PATCH] Hotfix BauSystem RamUsage and AutoShutdown --- BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java | 3 --- BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java | 2 -- 2 files changed, 5 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 2fa43b8..5a73cba 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -161,13 +161,11 @@ public class BauSystem extends JavaPlugin implements Listener { if (autoShutdown != null) { autoShutdown.cancel(); } - System.out.println("INIT AutoShutdown"); autoShutdown = Bukkit.getScheduler().runTaskTimer(this, new Runnable() { int count = 0; @Override public void run() { - System.out.println("RUN AutoShutdown " + count); if (count >= 300) { Bukkit.shutdown(); return; @@ -178,7 +176,6 @@ public class BauSystem extends JavaPlugin implements Listener { Bukkit.shutdown(); } } catch (Throwable throwable) { - throwable.printStackTrace(); Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable); Bukkit.shutdown(); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java b/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java index 33a1c48..b3fc6fd 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/RamUsage.java @@ -34,10 +34,8 @@ public class RamUsage { try { long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize(); long freeMemory = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize(); - System.out.println(memorySize + " " + freeMemory); return (memorySize - freeMemory) / (double) memorySize; } catch (Throwable throwable) { - throwable.printStackTrace(); Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable); return 1D; }