From b40bb81b7fcfeacde69d3bdf061d84e6101ec400 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 10 Oct 2023 18:18:17 +0200 Subject: [PATCH] Add TPSWarpUtils --- SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java b/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java index d803970..e678749 100644 --- a/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java +++ b/SpigotCore_Main/src/de/steamwar/core/ProtocolWrapper.java @@ -46,7 +46,7 @@ public interface ProtocolWrapper { default void initTPSWarp(LongSupplier longSupplier) { Class systemUtils = Reflection.getClass("{nms}.SystemUtils"); - Reflection.getField(systemUtils, LongSupplier.class, 0).set(systemUtils, longSupplier); + Reflection.getField(systemUtils, LongSupplier.class, 0).set(systemUtils, (LongSupplier) () -> System.nanoTime() + longSupplier.getAsLong()); } enum PlayerInfoAction {