From bd5b538f1dbcea223a8d4674fcb768c2bfec2a86 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Sat, 14 Dec 2013 22:09:38 +0400 Subject: [PATCH] Properly get sit height --- src/com/cnaude/chairs/EventListener.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/com/cnaude/chairs/EventListener.java b/src/com/cnaude/chairs/EventListener.java index fa7ec61..09bc7a9 100644 --- a/src/com/cnaude/chairs/EventListener.java +++ b/src/com/cnaude/chairs/EventListener.java @@ -237,24 +237,15 @@ public class EventListener implements Listener { double sh = 0.7; for (ChairBlock cb : plugin.allowedBlocks) { - if (cb.getMat().toString().contains("STAIRS")) { - if (cb.getMat().equals(block.getType())) { - sh = cb.getSitHeight(); - continue; - } - } else if (cb.getMat().equals(block.getType())) { + if (cb.getMat().equals(block.getType())) { sh = cb.getSitHeight(); - continue; + break; } } Stairs stairs = null; if (block.getState().getData() instanceof Stairs) { stairs = (Stairs) block.getState().getData(); - } else if (block.getState().getData() instanceof Step) { - } else if (block.getState().getData() instanceof WoodenStep) { - } else { - sh += plugin.sittingHeightAdj; } Location plocation = block.getLocation().clone();