From 6d0d33b9d27c3a0624e88e08bdd1715014e54be9 Mon Sep 17 00:00:00 2001 From: Jonatan Noponen Date: Wed, 31 Jul 2013 19:43:10 +0300 Subject: [PATCH] Fix off by 1 error for spawn protection. Fixes BUKKIT-4154 --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 8dea190bf2..cccfe75412 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 callEvent(T event) {