From dfee3d9f9f3b8ea63c21a5c8858f78aa89d3b24d Mon Sep 17 00:00:00 2001 From: bramhaag Date: Sat, 18 Mar 2017 11:08:37 +0100 Subject: [PATCH] Add getWidth + getHeight for Entity --- .../org/bukkit/craftbukkit/entity/CraftEntity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index c21e49b95f..a89231543c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -235,6 +235,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { entity.velocityChanged = true; } + @Override + public double getHeight() { + return getHandle().length; + } + + @Override + public double getWidth() { + return getHandle().width; + } + public boolean isOnGround() { if (entity instanceof EntityArrow) { return ((EntityArrow) entity).inGround;