Added spawn-protection property to server.properties

This commit is contained in:
Zenexer authored and tahg committed 2011-02-10 12:16:30 +08:00
1 parent 814c9d444f
commit fbe54b05f4
4 files changed
+12 -10

No files matched your search

@@ -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);