Fix OutOfBounds errors
continuous-integration/drone/push Build is passing Details

main
Bea 5 months ago
parent 51c178ab4f
commit 8d4284138f

@ -26,8 +26,6 @@ public class LocationCheckRunnable implements Runnable
public void run()
{
// if we checked all players, refill the list and skip the check for this time (in case server is empty).
if(playersToCheck.isEmpty()) {
playersToCheck.addAll(Bukkit.getServer().getOnlinePlayers());
return;
@ -37,8 +35,8 @@ public class LocationCheckRunnable implements Runnable
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);
if(!playersToCheck.isEmpty()) player = playersToCheck.get(0);
if(player != null) playersToCheck.remove(player);
}
Location playerLocation = player.getLocation();

@ -1,6 +1,6 @@
sizing:
island-distance: 500
allowed-range: 100
allowed-range: 50
island:
world-name: world
spawn-offset:

Loading…
Cancel
Save