diff options
author | Jonatan Noponen <jonatan.noponen@gmail.com> | 2013-07-31 19:43:10 +0300 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2013-08-03 18:23:38 -0400 |
commit | 6d0d33b9d27c3a0624e88e08bdd1715014e54be9 (patch) | |
tree | 787f5a8ff7edd74eb06bf3d8038c984739824f4a /src/main/java | |
parent | e7539378fa771aec2138deb66bdcec6a56d9577d (diff) | |
download | craftbukkit-6d0d33b9d27c3a0624e88e08bdd1715014e54be9.tar craftbukkit-6d0d33b9d27c3a0624e88e08bdd1715014e54be9.tar.gz craftbukkit-6d0d33b9d27c3a0624e88e08bdd1715014e54be9.tar.lz craftbukkit-6d0d33b9d27c3a0624e88e08bdd1715014e54be9.tar.xz craftbukkit-6d0d33b9d27c3a0624e88e08bdd1715014e54be9.zip |
Fix off by 1 error for spawn protection. Fixes BUKKIT-4154
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 8dea190b..cccfe754 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -86,7 +86,7 @@ public class CraftEventFactory { ChunkCoordinates chunkcoordinates = worldServer.getSpawn(); int distanceFromSpawn = Math.max(Math.abs(x - chunkcoordinates.x), Math.abs(z - chunkcoordinates.z)); - return distanceFromSpawn >= spawnSize; + return distanceFromSpawn > spawnSize; } public static <T extends Event> T callEvent(T event) { |