diff --git a/server/src/main/java/com/soulfiremc/server/util/TimeUtil.java b/server/src/main/java/com/soulfiremc/server/util/TimeUtil.java index 2c5578755..ca860e496 100644 --- a/server/src/main/java/com/soulfiremc/server/util/TimeUtil.java +++ b/server/src/main/java/com/soulfiremc/server/util/TimeUtil.java @@ -42,8 +42,12 @@ public boolean isReleasable() { } public boolean block() throws InterruptedException { - Thread.sleep(1); - return System.nanoTime() >= endTime; + var remainingTime = endTime - System.nanoTime(); + if (remainingTime > 0) { + Thread.sleep(remainingTime / NANOSECONDS_PER_MILLISECOND, (int) (remainingTime % NANOSECONDS_PER_MILLISECOND)); + } + + return true; } }); } catch (InterruptedException e) {