Fix OutOfBounds errors
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
51c178ab4f
commit
8d4284138f
@ -26,8 +26,6 @@ public class LocationCheckRunnable implements Runnable
|
|||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
// if we checked all players, refill the list and skip the check for this time (in case server is empty).
|
// if we checked all players, refill the list and skip the check for this time (in case server is empty).
|
||||||
|
|
||||||
|
|
||||||
if(playersToCheck.isEmpty()) {
|
if(playersToCheck.isEmpty()) {
|
||||||
playersToCheck.addAll(Bukkit.getServer().getOnlinePlayers());
|
playersToCheck.addAll(Bukkit.getServer().getOnlinePlayers());
|
||||||
return;
|
return;
|
||||||
@ -37,8 +35,8 @@ public class LocationCheckRunnable implements Runnable
|
|||||||
Player player = null;
|
Player player = null;
|
||||||
while(player == null || !player.isOnline()) // check if player left and in case, move to next one
|
while(player == null || !player.isOnline()) // check if player left and in case, move to next one
|
||||||
{
|
{
|
||||||
player = playersToCheck.get(0);
|
if(!playersToCheck.isEmpty()) player = playersToCheck.get(0);
|
||||||
playersToCheck.remove(player);
|
if(player != null) playersToCheck.remove(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
Location playerLocation = player.getLocation();
|
Location playerLocation = player.getLocation();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
sizing:
|
sizing:
|
||||||
island-distance: 500
|
island-distance: 500
|
||||||
allowed-range: 100
|
allowed-range: 50
|
||||||
island:
|
island:
|
||||||
world-name: world
|
world-name: world
|
||||||
spawn-offset:
|
spawn-offset:
|
||||||
|
Loading…
Reference in New Issue
Block a user