mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-10-31 17:29:25 +00:00
Fixes an IllegalArgumentException (#640)
* Fixes an IllegalArgumentException * Correct change and make it fit our format
This commit is contained in:
parent
37b75ec14d
commit
f5ead493a0
|
@ -849,7 +849,7 @@ public class GeneralMethods {
|
|||
Iterator<Entity> entityIterator = entities.iterator();
|
||||
while (entityIterator.hasNext()) {
|
||||
Entity e = entityIterator.next();
|
||||
if (e.getLocation().distanceSquared(location) > radius * radius) {
|
||||
if (e.getWorld().equals(location.getWorld()) && e.getLocation().distanceSquared(location) > radius * radius) {
|
||||
entityIterator.remove();
|
||||
} else if (e instanceof Player && ((Player)e).getGameMode().equals(GameMode.SPECTATOR)) {
|
||||
entityIterator.remove();
|
||||
|
@ -1936,4 +1936,4 @@ public class GeneralMethods {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue