Fixed a distance check.

Oops, can't measure distance when locations are in different worlds.
This commit is contained in:
ryanhamshire 2015-06-09 19:12:08 -07:00
parent 366f018ec1
commit c5b57af151

View File

@ -75,7 +75,7 @@ class SiegeCheckupTask implements Runnable
} }
//if they both left, but are still close together, the battle continues (check again later) //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(); this.scheduleAnotherCheck();
} }