Added spawn-protection property to server.properties

This commit is contained in:
Zenexer
2011-02-10 12:02:37 +08:00
committed by tahg
parent 1da852265a
commit 96794e15db
4 changed files with 8 additions and 10 deletions

View File

@@ -98,9 +98,7 @@ public class ItemBlock extends Item {
int distanceFromSpawn = (int) Math.max(Math.abs(i - world.spawnX), Math.abs(k - world.spawnZ));
// CraftBukkit hardcoded Spawn distance for now
// TODO make spawn size configurable
boolean canBuild = distanceFromSpawn > ((WorldServer) world).D.spawnProtection || thePlayer.isOp();
boolean canBuild = distanceFromSpawn > ((WorldServer) world).D.spawnProtection || thePlayer.isOp(); // CraftBukkit Configurable spawn protection start
BlockPlaceEvent event = new BlockPlaceEvent(eventType, placedBlock, replacedBlockState, blockClicked, itemInHand, thePlayer, canBuild);
server.getPluginManager().callEvent(event);