Fix player null check in location runnable
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
500f7b33cb
commit
dd1425863a
@ -32,9 +32,15 @@ public class LocationCheckRunnable implements Runnable
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = playersToCheck.get(0);
|
||||
// load the player
|
||||
Player player = null;
|
||||
while(player == null || !player.isOnline()) // check if player left and in case, move to next one
|
||||
{
|
||||
player = playersToCheck.get(0);
|
||||
playersToCheck.remove(player);
|
||||
}
|
||||
|
||||
Location playerLocation = player.getLocation();
|
||||
playersToCheck.remove(player);
|
||||
|
||||
Coordinates playerIslandCoordinates = Cache.playerIslands.get(player.getName());
|
||||
|
||||
|
0
src/main/resources/config.yml
Normal file
0
src/main/resources/config.yml
Normal file
Loading…
Reference in New Issue
Block a user