Fixed disablebuildmessage setting which broke block placement protection by buildinzonesonly and didn't work for block breaking.

This commit is contained in:
taoneill 2012-01-03 22:07:18 -05:00
parent e1c6397f22
commit dd6beb3b82

View File

@ -89,8 +89,10 @@ public class WarBlockListener extends BlockListener {
} }
// buildInZonesOnly // buildInZonesOnly
if (zone == null && War.war.isBuildInZonesOnly() && !War.war.canBuildOutsideZone(player) && !War.war.isDisableBuildMessage()) { if (zone == null && War.war.isBuildInZonesOnly() && !War.war.canBuildOutsideZone(player)) {
if (!War.war.isDisableBuildMessage()) {
War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside."); War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside.");
}
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
@ -287,7 +289,9 @@ public class WarBlockListener extends BlockListener {
// buildInZonesOnly // buildInZonesOnly
Warzone blockZone = Warzone.getZoneByLocation(new Location(block.getWorld(), block.getX(), block.getY(), block.getZ())); Warzone blockZone = Warzone.getZoneByLocation(new Location(block.getWorld(), block.getX(), block.getY(), block.getZ()));
if (blockZone == null && War.war.isBuildInZonesOnly() && !War.war.canBuildOutsideZone(player)) { if (blockZone == null && War.war.isBuildInZonesOnly() && !War.war.canBuildOutsideZone(player)) {
if (!War.war.isDisableBuildMessage()) {
War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside."); War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside.");
}
event.setCancelled(true); event.setCancelled(true);
return; return;
} }