From a80770f5d3f9f298c4ad72793aba92debc8e85e4 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 9 May 2023 11:25:47 +0200 Subject: [PATCH 1/2] Removing 1.15 only TPSWarp limiter... --- .../de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java index fff2ebe6..482ff2ee 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java @@ -21,7 +21,6 @@ package de.steamwar.bausystem.features.tpslimit; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.utils.NMSWrapper; -import de.steamwar.core.Core; import de.steamwar.core.TPSWatcher; import lombok.experimental.UtilityClass; import org.bukkit.Bukkit; @@ -42,9 +41,6 @@ public class TPSWarpUtils { public static void setTPS(double tps) { double d = 50 - (50 / (tps / 20.0)); nanoDOffset = Math.max(0, Math.min((long) (d * 1000000), 375000000)); - if (Core.getVersion() != 15) { - return; - } if (nanoDOffset == 0) { if (bukkitTask == null) return; bukkitTask.cancel(); From 3c7168494f0d6ecde5e433d6fbe1921c9a2ddc35 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 9 May 2023 11:42:39 +0200 Subject: [PATCH 2/2] Fix TPS Warp inversion --- .../de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java index 482ff2ee..b6f4fa9a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSWarpUtils.java @@ -45,7 +45,7 @@ public class TPSWarpUtils { if (bukkitTask == null) return; bukkitTask.cancel(); bukkitTask = null; - } else if (bukkitTask != null) { + } else if (bukkitTask == null) { bukkitTask = Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> nanoOffset += nanoDOffset, 1, 1); } }