Properly get sit height
This commit is contained in:
parent
939a70808f
commit
bd5b538f1d
@ -237,24 +237,15 @@ public class EventListener implements Listener {
|
|||||||
double sh = 0.7;
|
double sh = 0.7;
|
||||||
|
|
||||||
for (ChairBlock cb : plugin.allowedBlocks) {
|
for (ChairBlock cb : plugin.allowedBlocks) {
|
||||||
if (cb.getMat().toString().contains("STAIRS")) {
|
if (cb.getMat().equals(block.getType())) {
|
||||||
if (cb.getMat().equals(block.getType())) {
|
|
||||||
sh = cb.getSitHeight();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else if (cb.getMat().equals(block.getType())) {
|
|
||||||
sh = cb.getSitHeight();
|
sh = cb.getSitHeight();
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Stairs stairs = null;
|
Stairs stairs = null;
|
||||||
if (block.getState().getData() instanceof Stairs) {
|
if (block.getState().getData() instanceof Stairs) {
|
||||||
stairs = (Stairs) block.getState().getData();
|
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();
|
Location plocation = block.getLocation().clone();
|
||||||
|
Loading…
Reference in New Issue
Block a user