diff options
author | md_5 <git@md-5.net> | 2018-02-10 12:17:00 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-02-10 12:17:00 +1100 |
commit | 9ab298de7b0055e0d3dbb64390104ea48a14207b (patch) | |
tree | b167ff05f9cbd093b5f507641e38bafeb7c8234f /src/main/java | |
parent | aa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6 (diff) | |
download | craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar.gz craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar.lz craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar.xz craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.zip |
SPIGOT-3807: Improve getEyeHeight
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 15 |
2 files changed, 4 insertions, 13 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 425919cd..bf4428e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -126,7 +126,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return getHandle().getHeadHeight(); } - public double getEyeHeight(boolean ignoreSneaking) { + public double getEyeHeight(boolean ignorePose) { return getEyeHeight(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 9405e6b4..20059b94 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -131,20 +131,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override - public double getEyeHeight() { - return getEyeHeight(false); - } - - @Override - public double getEyeHeight(boolean ignoreSneaking) { - if (ignoreSneaking) { + public double getEyeHeight(boolean ignorePose) { + if (ignorePose) { return 1.62D; } else { - if (isSneaking()) { - return 1.54D; - } else { - return 1.62D; - } + return getEyeHeight(); } } |