mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-11-01 01:42:18 +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();
|
Iterator<Entity> entityIterator = entities.iterator();
|
||||||
while (entityIterator.hasNext()) {
|
while (entityIterator.hasNext()) {
|
||||||
Entity e = entityIterator.next();
|
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();
|
entityIterator.remove();
|
||||||
} else if (e instanceof Player && ((Player)e).getGameMode().equals(GameMode.SPECTATOR)) {
|
} else if (e instanceof Player && ((Player)e).getGameMode().equals(GameMode.SPECTATOR)) {
|
||||||
entityIterator.remove();
|
entityIterator.remove();
|
||||||
|
|
Loading…
Reference in a new issue