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:
@@ -32,9 +32,15 @@ public class LocationCheckRunnable implements Runnable
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player player = playersToCheck.get(0);
|
// load the player
|
||||||
Location playerLocation = player.getLocation();
|
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);
|
playersToCheck.remove(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
Location playerLocation = player.getLocation();
|
||||||
|
|
||||||
Coordinates playerIslandCoordinates = Cache.playerIslands.get(player.getName());
|
Coordinates playerIslandCoordinates = Cache.playerIslands.get(player.getName());
|
||||||
|
|
||||||
|
0
src/main/resources/config.yml
Normal file
0
src/main/resources/config.yml
Normal file
Reference in New Issue
Block a user