Check up to maxChairWidth blocks when searching for signs

This commit is contained in:
Shevchik 2015-01-15 13:18:34 +04:00
parent c50a844484
commit 93e678e749

View File

@ -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 <= 100; i++) {
for (int i = 1; i <= plugin.maxChairWidth + 1; i++) {
Block relative = block.getRelative(face, i);
if (checkDirection(block, relative)) {
continue;