From 1257322d1fe41a7c43c698f977ff7a44922c21fe Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 28 Oct 2017 16:00:15 +1100 Subject: [PATCH] SPIGOT-3622: Issue in some combinations of spawn protection --- .../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 33020b902d..1f8f580f60 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -84,7 +84,7 @@ public class CraftEventFactory { BlockPosition chunkcoordinates = worldServer.getSpawn(); - int distanceFromSpawn = Math.max(Math.abs(x - chunkcoordinates.getX()), Math.abs(z - chunkcoordinates.getY())); + int distanceFromSpawn = Math.max(Math.abs(x - chunkcoordinates.getX()), Math.abs(z - chunkcoordinates.getZ())); return distanceFromSpawn > spawnSize; }