summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-02-10 12:17:00 +1100
committermd_5 <git@md-5.net>2018-02-10 12:17:00 +1100
commit9ab298de7b0055e0d3dbb64390104ea48a14207b (patch)
treeb167ff05f9cbd093b5f507641e38bafeb7c8234f
parentaa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6 (diff)
downloadcraftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar
craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar.gz
craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar.lz
craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.tar.xz
craftbukkit-9ab298de7b0055e0d3dbb64390104ea48a14207b.zip
SPIGOT-3807: Improve getEyeHeight
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java15
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();
}
}