Fix null position async errors
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bea 2022-11-12 01:27:41 +01:00
parent 8d4284138f
commit fcbd6c5d01
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ public class LocationCheckRunnable implements Runnable
if(player != null) playersToCheck.remove(player);
}
if(!Cache.playerIslands.containsKey(player.getName()))
return; //it means the player just joined and still didn't get an island (reminder that this is async)
Location playerLocation = player.getLocation();
Coordinates playerIslandCoordinates = Cache.playerIslands.get(player.getName());