diff --git a/src/main/java/eu/m724/tweaks/sleep/SleepListener.java b/src/main/java/eu/m724/tweaks/sleep/SleepListener.java index 3a7a27d..6e0c23c 100644 --- a/src/main/java/eu/m724/tweaks/sleep/SleepListener.java +++ b/src/main/java/eu/m724/tweaks/sleep/SleepListener.java @@ -39,7 +39,7 @@ public class SleepListener implements Listener { if (!skippedCurrentNight.contains(event.getPlayer())) { double onePlayerRatio = 1 / (event.getPlayer().getServer().getOnlinePlayers().size() * (world.getGameRuleValue(GameRule.PLAYERS_SLEEPING_PERCENTAGE) / 100.0)); - world.setTime((long) ((23459 - world.getTime()) * onePlayerRatio)); + world.setTime(Math.min(world.getTime() + (long) (10917 * onePlayerRatio), 23459)); skippedCurrentNight.add(event.getPlayer()); } }