These checks may not work correctly, so reverted

This commit is contained in:
zml2008 2012-01-27 07:36:53 -08:00 committed by TomyLobo
parent 7dcca7e505
commit e665f966e6
2 changed files with 12 additions and 12 deletions

View File

@ -917,7 +917,7 @@ private boolean isInvincible(Player player) {
boolean god = cfg.hasGodMode(player); boolean god = cfg.hasGodMode(player);
if (wcfg.useRegions) { if (wcfg.useRegions) {
Boolean flag = RegionQueryUtil.isAllowedInvinciblity(plugin, player); Boolean flag = RegionQueryUtil.isAllowedInvinciblity(plugin, player);
boolean allowed = flag == null || flag == Boolean.TRUE; boolean allowed = flag == null || flag == true;
boolean invincible = RegionQueryUtil.isInvincible(plugin, player); boolean invincible = RegionQueryUtil.isInvincible(plugin, player);
if (allowed) { if (allowed) {

View File

@ -57,23 +57,23 @@ private boolean isProtectedSignAround(Block searchBlock, Player player) {
side = searchBlock; side = searchBlock;
res = isProtectedSign(side, player); res = isProtectedSign(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res) return res;
side = searchBlock.getRelative(-1, 0, 0); side = searchBlock.getRelative(-1, 0, 0);
res = isProtectedSignAndChest(side, player); res = isProtectedSignAndChest(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res) return res;
side = searchBlock.getRelative(1, 0, 0); side = searchBlock.getRelative(1, 0, 0);
res = isProtectedSignAndChest(side, player); res = isProtectedSignAndChest(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res) return res;
side = searchBlock.getRelative(0, 0, -1); side = searchBlock.getRelative(0, 0, -1);
res = isProtectedSignAndChest(side, player); res = isProtectedSignAndChest(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res) return res;
side = searchBlock.getRelative(0, 0, 1); side = searchBlock.getRelative(0, 0, 1);
res = isProtectedSignAndChest(side, player); res = isProtectedSignAndChest(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res) return res;
return false; return false;
} }
@ -115,7 +115,7 @@ private Boolean isProtectedSignAndChest(Block block, Player player) {
private boolean isProtectedSignAndChestBinary(Block block, Player player) { private boolean isProtectedSignAndChestBinary(Block block, Player player) {
Boolean res = isProtectedSignAndChest(block, player); Boolean res = isProtectedSignAndChest(block, player);
if (res == null || res == Boolean.FALSE) { if (res == null || !res) {
return false; return false;
} }
return true; return true;
@ -127,23 +127,23 @@ public boolean isAdjacentChestProtected(Block searchBlock, Player player) {
side = searchBlock; side = searchBlock;
res = isProtected(side, player); res = isProtected(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res == true) return res;
side = searchBlock.getRelative(-1, 0, 0); side = searchBlock.getRelative(-1, 0, 0);
res = isProtected(side, player); res = isProtected(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res == true) return res;
side = searchBlock.getRelative(1, 0, 0); side = searchBlock.getRelative(1, 0, 0);
res = isProtected(side, player); res = isProtected(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res == true) return res;
side = searchBlock.getRelative(0, 0, -1); side = searchBlock.getRelative(0, 0, -1);
res = isProtected(side, player); res = isProtected(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res == true) return res;
side = searchBlock.getRelative(0, 0, 1); side = searchBlock.getRelative(0, 0, 1);
res = isProtected(side, player); res = isProtected(side, player);
if (res != null && res == Boolean.TRUE) return res; if (res != null && res == true) return res;
return false; return false;
} }