Added spawn-protection property to server.properties

This commit is contained in:
Zenexer
2011-02-10 11:15:03 +08:00
committed by tahg
parent 814c9d444f
commit fbe54b05f4
4 changed files with 12 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ public class ItemBlock extends Item {
// CraftBukkit hardcoded Spawn distance for now
// TODO make spawn size configurable
boolean canBuild = distanceFromSpawn > 16 || thePlayer.isOp();
boolean canBuild = distanceFromSpawn > ((WorldServer) world).minecraftServer.spawnProtection || thePlayer.isOp();
BlockPlaceEvent event = new BlockPlaceEvent(eventType, placedBlock, replacedBlockState, blockClicked, itemInHand, thePlayer, canBuild);
server.getPluginManager().callEvent(event);