We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdfd8ee commit 41adb3bCopy full SHA for 41adb3b
1 file changed
src/main/java/adhdmc/sleepmessages/SleepListener.java
@@ -26,7 +26,7 @@ public void onPlayerSleep(PlayerDeepSleepEvent event) {
26
int currentSleepCount = 0;
27
int worldOnlineTotal = world.getPlayerCount();
28
Integer worldSleepPercent = world.getGameRuleValue(GameRule.PLAYERS_SLEEPING_PERCENTAGE);
29
- Integer neededSleepers = (worldSleepPercent / 100) * worldOnlineTotal;
+ Integer neededSleepers = Math.ceil((worldSleepPercent.floatValue() / 100) * worldOnlineTotal);
30
List<Player> playerList = world.getPlayers();
31
for (Player player : playerList) {
32
if (player.isDeeplySleeping()) currentSleepCount += 1;
0 commit comments