summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/entity/Entity.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 62bf70f5..2cc60fe9 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -5,7 +5,9 @@ import org.bukkit.EntityEffect;
import org.bukkit.Nameable;
import org.bukkit.Server;
import org.bukkit.World;
+import org.bukkit.block.BlockFace;
import org.bukkit.event.entity.EntityDamageEvent;
+import org.bukkit.material.Directional;
import org.bukkit.metadata.Metadatable;
import org.bukkit.util.Vector;
@@ -508,4 +510,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable {
* @return reaction
*/
PistonMoveReaction getPistonMoveReaction();
+
+ /**
+ * Get the closest cardinal {@link BlockFace} direction an entity is
+ * currently facing.
+ * <br>
+ * This will not return any non-cardinal directions such as
+ * {@link BlockFace#UP} or {@link BlockFace#DOWN}.
+ * <br>
+ * {@link Hanging} entities will override this call and thus their behavior
+ * may be different.
+ *
+ * @return the entity's current cardinal facing.
+ * @see Hanging
+ * @see Directional#getFacing()
+ */
+ BlockFace getFacing();
}