Skip to content

Commit

Permalink
fixed some if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccoystephenson committed Jul 9, 2020
1 parent 4b7cf41 commit 59a7231
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ private boolean isNextToNonOwnedLockedChest(Player player, Block block) {
}
}

if (main.isChest(neighbor1)) {
if (main.isChest(neighbor2)) {
if (main.isBlockLocked(neighbor2) && !main.getLockedBlock(neighbor2).getOwner().equalsIgnoreCase(player.getName())) {
return true;
}
}

if (main.isChest(neighbor1)) {
if (main.isChest(neighbor3)) {
if (main.isBlockLocked(neighbor3) && !main.getLockedBlock(neighbor3).getOwner().equalsIgnoreCase(player.getName())) {
return true;
}
}

if (main.isChest(neighbor1)) {
if (main.isChest(neighbor4)) {
if (main.isBlockLocked(neighbor4) && !main.getLockedBlock(neighbor4).getOwner().equalsIgnoreCase(player.getName())) {
return true;
}
Expand All @@ -114,7 +114,7 @@ private boolean isUnderOrAboveNonOwnedLockedChest(Player player, Block block) {
}
}

if (main.isChest(neighbor1)) {
if (main.isChest(neighbor2)) {
if (main.isBlockLocked(neighbor2) && !main.getLockedBlock(neighbor2).getOwner().equalsIgnoreCase(player.getName())) {
return true;
}
Expand Down

0 comments on commit 59a7231

Please sign in to comment.