Fixed a distance check.
Oops, can't measure distance when locations are in different worlds.
This commit is contained in:
@@ -75,7 +75,7 @@ class SiegeCheckupTask implements Runnable
|
||||
}
|
||||
|
||||
//if they both left, but are still close together, the battle continues (check again later)
|
||||
else if(attacker.getLocation().distanceSquared(defender.getLocation()) < 2500) //50-block radius for chasing
|
||||
else if(attacker.getWorld().equals(defender.getWorld()) && attacker.getLocation().distanceSquared(defender.getLocation()) < 2500) //50-block radius for chasing
|
||||
{
|
||||
this.scheduleAnotherCheck();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user