Fix off by 1 error for spawn protection. Fixes BUKKIT-4154
By: Jonatan Noponen <jonatan.noponen@gmail.com>
This commit is contained in:
@@ -86,7 +86,7 @@ public class CraftEventFactory {
|
|||||||
ChunkCoordinates chunkcoordinates = worldServer.getSpawn();
|
ChunkCoordinates chunkcoordinates = worldServer.getSpawn();
|
||||||
|
|
||||||
int distanceFromSpawn = Math.max(Math.abs(x - chunkcoordinates.x), Math.abs(z - chunkcoordinates.z));
|
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) {
|
public static <T extends Event> T callEvent(T event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user