Standardizing override permission nodes (with backwards compatibility)

This commit is contained in:
Wizjany 2011-06-10 16:00:14 -04:00
parent 02f6b3be42
commit b2cd3d31fd

View File

@ -336,7 +336,8 @@ public boolean isChestProtected(Block block, Player player) {
if (!signChestProtection) {
return false;
}
if (plugin.hasPermission(player, "worldguard.chest-protection.override")) {
if (plugin.hasPermission(player, "worldguard.chest-protection.override")
|| plugin.hasPermission(player, "worldguard.override.chest-protection")) {
return false;
}
return chestProtection.isProtected(block, player);
@ -353,7 +354,8 @@ public boolean isChestProtectedPlacement(Block block, Player player) {
if (!signChestProtection) {
return false;
}
if (plugin.hasPermission(player, "worldguard.chest-protection.override")) {
if (plugin.hasPermission(player, "worldguard.chest-protection.override")
|| plugin.hasPermission(player, "worldguard.override.chest-protection")) {
return false;
}
return chestProtection.isProtectedPlacement(block, player);
@ -363,7 +365,8 @@ public boolean isAdjacentChestProtected(Block block, Player player) {
if (!signChestProtection) {
return false;
}
if (plugin.hasPermission(player, "worldguard.chest-protection.override")) {
if (plugin.hasPermission(player, "worldguard.chest-protection.override")
|| plugin.hasPermission(player, "worldguard.override.chest-protection")) {
return false;
}
return chestProtection.isAdjacentChestProtected(block, player);