mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
These checks may not work correctly, so reverted
This commit is contained in:
parent
7dcca7e505
commit
e665f966e6
@ -917,7 +917,7 @@ private boolean isInvincible(Player player) {
|
||||
boolean god = cfg.hasGodMode(player);
|
||||
if (wcfg.useRegions) {
|
||||
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);
|
||||
|
||||
if (allowed) {
|
||||
|
@ -57,23 +57,23 @@ private boolean isProtectedSignAround(Block searchBlock, Player player) {
|
||||
|
||||
side = searchBlock;
|
||||
res = isProtectedSign(side, player);
|
||||
if (res != null && res == Boolean.TRUE) return res;
|
||||
if (res != null && res) return res;
|
||||
|
||||
side = searchBlock.getRelative(-1, 0, 0);
|
||||
res = isProtectedSignAndChest(side, player);
|
||||
if (res != null && res == Boolean.TRUE) return res;
|
||||
if (res != null && res) return res;
|
||||
|
||||
side = searchBlock.getRelative(1, 0, 0);
|
||||
res = isProtectedSignAndChest(side, player);
|
||||
if (res != null && res == Boolean.TRUE) return res;
|
||||
if (res != null && res) return res;
|
||||
|
||||
side = searchBlock.getRelative(0, 0, -1);
|
||||
res = isProtectedSignAndChest(side, player);
|
||||
if (res != null && res == Boolean.TRUE) return res;
|
||||
if (res != null && res) return res;
|
||||
|
||||
side = searchBlock.getRelative(0, 0, 1);
|
||||
res = isProtectedSignAndChest(side, player);
|
||||
if (res != null && res == Boolean.TRUE) return res;
|
||||
if (res != null && res) return res;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -115,7 +115,7 @@ private Boolean isProtectedSignAndChest(Block block, Player player) {
|
||||
|
||||
private boolean isProtectedSignAndChestBinary(Block block, Player player) {
|
||||
Boolean res = isProtectedSignAndChest(block, player);
|
||||
if (res == null || res == Boolean.FALSE) {
|
||||
if (res == null || !res) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -127,23 +127,23 @@ public boolean isAdjacentChestProtected(Block searchBlock, Player player) {
|
||||
|
||||
side = searchBlock;
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
res = isProtected(side, player);
|
||||
if (res != null && res == Boolean.TRUE) return res;
|
||||
if (res != null && res == true) return res;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user