Update for 1.4_00_01 -- if you bypassed Bukkit, you will most likely break.

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot
2011-04-20 19:05:14 +02:00
parent 91e69e54b4
commit 070c214267
28 changed files with 255 additions and 288 deletions

View File

@@ -46,14 +46,14 @@ import org.bukkit.event.player.PlayerInteractEvent;
public class CraftEventFactory {
private static boolean canBuild(CraftWorld world, Player player, int x, int z) {
WorldServer worldServer = world.getHandle();
int spawnSize = worldServer.x.spawnProtection;
int spawnSize = worldServer.server.spawnProtection;
if (spawnSize <= 0) return true;
if (player.isOp()) return true;
ChunkCoordinates chunkcoordinates = worldServer.m();
ChunkCoordinates chunkcoordinates = worldServer.getSpawn();
int distanceFromSpawn = (int) Math.max(Math.abs(x - chunkcoordinates.a), Math.abs(z - chunkcoordinates.c));
int distanceFromSpawn = (int) Math.max(Math.abs(x - chunkcoordinates.x), Math.abs(z - chunkcoordinates.z));
return distanceFromSpawn > spawnSize;
}