From 89309be62382ad35b3726242ef317ce4e7593b0c Mon Sep 17 00:00:00 2001 From: Shevchik Date: Fri, 13 Dec 2013 13:17:35 +0400 Subject: [PATCH] Remove sitting height setting. --- src/com/cnaude/chairs/Chairs.java | 5 ++--- src/com/cnaude/chairs/EventListener.java | 2 +- src/config.yml | 21 ++++++++++----------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/com/cnaude/chairs/Chairs.java b/src/com/cnaude/chairs/Chairs.java index 9f57de8..1cc3739 100644 --- a/src/com/cnaude/chairs/Chairs.java +++ b/src/com/cnaude/chairs/Chairs.java @@ -29,7 +29,7 @@ public class Chairs extends JavaPlugin { public boolean autoRotate, signCheck, notifyplayer; public boolean invertedStairCheck, invertedStepCheck, ignoreIfBlockInHand; public boolean sitEffectsEnabled; - public double sittingHeight, sittingHeightAdj, distance; + public double sittingHeightAdj, distance; public int maxChairWidth; public int sitMaxHealth; public int sitHealthPerInterval; @@ -144,7 +144,6 @@ public class Chairs extends JavaPlugin { public void loadConfig() { autoRotate = getConfig().getBoolean("auto-rotate"); signCheck = getConfig().getBoolean("sign-check"); - sittingHeight = getConfig().getDouble("sitting-height"); sittingHeightAdj = getConfig().getDouble("sitting-height-adj"); distance = getConfig().getDouble("distance"); maxChairWidth = getConfig().getInt("max-chair-width"); @@ -171,7 +170,7 @@ public class Chairs extends JavaPlugin { allowedBlocks = new ArrayList(); for (String s : getConfig().getStringList("allowed-blocks")) { String type; - double sh = sittingHeight; + double sh = 0.7; String d = "0"; if (s.contains(":")) { String tmp[] = s.split(":",3); diff --git a/src/com/cnaude/chairs/EventListener.java b/src/com/cnaude/chairs/EventListener.java index 77ae629..7ca3c26 100644 --- a/src/com/cnaude/chairs/EventListener.java +++ b/src/com/cnaude/chairs/EventListener.java @@ -221,7 +221,7 @@ public class EventListener implements Listener { private Location getSitLocation(Block block, Float playerYaw) { - double sh = plugin.sittingHeight; + double sh = 0.7; for (ChairBlock cb : plugin.allowedBlocks) { if (cb.getMat().toString().contains("STAIRS")) { diff --git a/src/config.yml b/src/config.yml index 3a3acca..866d1ac 100644 --- a/src/config.yml +++ b/src/config.yml @@ -16,16 +16,16 @@ # ignore-if-item-in-hand: Set this true disable sititng if player is holding an item in hand. # ------ allowed-blocks: - - WOOD_STAIRS - - SPRUCE_WOOD_STAIRS - - JUNGLE_WOOD_STAIRS - - BIRCH_WOOD_STAIRS - - SANDSTONE_STAIRS - - COBBLESTONE_STAIRS - - BRICK_STAIRS - - SMOOTH_STAIRS - - NETHER_BRICK_STAIRS - - QUARTZ_STAIRS + - WOOD_STAIRS:0.7 + - SPRUCE_WOOD_STAIRS:0.7 + - JUNGLE_WOOD_STAIRS:0.7 + - BIRCH_WOOD_STAIRS:0.7 + - SANDSTONE_STAIRS:0.7 + - COBBLESTONE_STAIRS:0.7 + - BRICK_STAIRS:0.7 + - SMOOTH_STAIRS:0.7 + - NETHER_BRICK_STAIRS:0.7 + - QUARTZ_STAIRS:0.7 valid-signs: - SIGN - WALL_SIGN @@ -36,7 +36,6 @@ max-chair-width: 3 sign-check: false distance: 2 disabledRegions: [] -sitting-height: 0.7 sitting-height-adj: 1.0 notify-player: true upside-down-check: true