mirror of
https://github.com/taoneill/war.git
synced 2024-11-23 18:55:28 +01:00
Fixed disablebuildmessage setting which broke block placement protection by buildinzonesonly and didn't work for block breaking.
This commit is contained in:
parent
e1c6397f22
commit
dd6beb3b82
@ -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)) {
|
||||||
War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside.");
|
if (!War.war.isDisableBuildMessage()) {
|
||||||
|
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)) {
|
||||||
War.war.badMsg(player, "You can only build inside warzones. Ask for the 'war.build' permission to build outside.");
|
if (!War.war.isDisableBuildMessage()) {
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user