Fix instant sleep
This commit is contained in:
parent
94f6b62a28
commit
49c6139d99
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue