Archived
0

Fixed bug where it'd throw an error if there were 0 players in te world

This commit is contained in:
Minenash
2019-01-07 17:30:16 -05:00
parent 2750813de0
commit 82a8c9b24b

View File

@@ -43,7 +43,7 @@ public class Survival implements Module, Listener {
boolean suspendEvents = false;
public void checkSleep(World world) {
if (suspendEvents || !canSleep(world.getTime(), world.isThundering()))
if (suspendEvents || !canSleep(world.getTime(), world.isThundering()) || world.getPlayers().size() == 0)
return;
int sleepingPlayers = 0;