From e8d72030c863b7625fd0e1827896fdd2e30111d0 Mon Sep 17 00:00:00 2001 From: Andrew Ardill Date: Thu, 10 Mar 2011 05:36:41 +1100 Subject: Added LivingEntity.getEyeLocation() for getting the eyes location. --- src/main/java/org/bukkit/entity/LivingEntity.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index 97cd6281..f9b221ee 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -3,6 +3,8 @@ package org.bukkit.entity; import java.util.HashSet; import java.util.List; + +import org.bukkit.Location; import org.bukkit.block.Block; /** @@ -38,6 +40,13 @@ public interface LivingEntity extends Entity { */ public double getEyeHeight(boolean ignoreSneaking); + /** + * Get a Location detailing the current eye position of the LivingEntity. + * + * @return a Location at the eyes of the LivingEntity. + */ + public Location getEyeLocation(); + /** * Gets all blocks along the player's line of sight * List iterates from player's position to target inclusive -- cgit v1.2.3