Fixed bug where it'd throw an error if there were 0 players in te world
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user