From 59a72310e6813c3188de5aa02ab29764de0fe17c Mon Sep 17 00:00:00 2001 From: dmccoystephenson Date: Wed, 8 Jul 2020 22:05:32 -0600 Subject: [PATCH] fixed some if statements --- .../EventHandlers/BlockPlaceEventHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/factionsystem/EventHandlers/BlockPlaceEventHandler.java b/src/main/java/factionsystem/EventHandlers/BlockPlaceEventHandler.java index 1eea7d8d2..aa9726f39 100644 --- a/src/main/java/factionsystem/EventHandlers/BlockPlaceEventHandler.java +++ b/src/main/java/factionsystem/EventHandlers/BlockPlaceEventHandler.java @@ -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; } @@ -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; }