Made unbreakable zone setting also mean no-build.

This commit is contained in:
taoneill 2011-02-20 19:59:04 -05:00
parent e1c33a2fef
commit 4f1be9cb78

View File

@ -84,6 +84,18 @@ public class WarBlockListener extends BlockListener {
event.setCancelled(true);
return;
}
boolean isZoneMaker = war.isZoneMaker(player);
// unbreakableZoneBlocks
if(zone != null && zone.isUnbreakableZoneBlocks()
&& (!isZoneMaker
|| (isZoneMaker && team != null))
) {
// if the zone is unbreakable, no one but zone makers can break blocks (even then, zone makers in a team can't break blocks
war.badMsg(player, "The blocks in this zone are unbreakable - this also means you can't build!");
event.setCancelled(true);
return;
}
}
}