From 10d066106626d450e011a2d9066964c37a69e492 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Sat, 17 Jan 2015 11:15:33 +0400 Subject: [PATCH] Scan for 2 additional blocks --- src/com/cnaude/chairs/listeners/TrySitEventListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/cnaude/chairs/listeners/TrySitEventListener.java b/src/com/cnaude/chairs/listeners/TrySitEventListener.java index 0fbe00e..2aa9016 100644 --- a/src/com/cnaude/chairs/listeners/TrySitEventListener.java +++ b/src/com/cnaude/chairs/listeners/TrySitEventListener.java @@ -232,7 +232,7 @@ public class TrySitEventListener implements Listener { private boolean checkSign(Block block, BlockFace face) { // Go through the blocks next to the clicked block and check if are signs on the end. - for (int i = 1; i <= plugin.maxChairWidth + 1; i++) { + for (int i = 1; i <= plugin.maxChairWidth + 2; i++) { Block relative = block.getRelative(face, i); if (checkDirection(block, relative)) { continue; @@ -258,7 +258,7 @@ public class TrySitEventListener implements Listener { private boolean checkFrame(Block block, BlockFace face, Player player) { // Go through the blocks next to the clicked block and check if are signs on the end. - for (int i = 1; i <= 100; i++) { + for (int i = 1; i <= plugin.maxChairWidth + 2; i++) { Block relative = block.getRelative(face, i); if (checkDirection(block, relative)) { continue;