Fix player null check in location runnable
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
500f7b33cb
commit
dd1425863a
|
@ -32,9 +32,15 @@ public class LocationCheckRunnable implements Runnable
|
||||||
return;
|
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();
|
Location playerLocation = player.getLocation();
|
||||||
playersToCheck.remove(player);
|
|
||||||
|
|
||||||
Coordinates playerIslandCoordinates = Cache.playerIslands.get(player.getName());
|
Coordinates playerIslandCoordinates = Cache.playerIslands.get(player.getName());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue