From c5b57af151e0a3910b127601da05e7f003f72f15 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Tue, 9 Jun 2015 19:12:08 -0700 Subject: [PATCH] Fixed a distance check. Oops, can't measure distance when locations are in different worlds. --- src/me/ryanhamshire/GriefPrevention/SiegeCheckupTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/ryanhamshire/GriefPrevention/SiegeCheckupTask.java b/src/me/ryanhamshire/GriefPrevention/SiegeCheckupTask.java index ed8c64f..6a6c8fb 100644 --- a/src/me/ryanhamshire/GriefPrevention/SiegeCheckupTask.java +++ b/src/me/ryanhamshire/GriefPrevention/SiegeCheckupTask.java @@ -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(); }