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