summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/entity/LivingEntity.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 6787d79a..e93453a3 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -269,4 +269,13 @@ public interface LivingEntity extends Entity {
* @return A collection of {@link PotionEffect}s
*/
public Collection<PotionEffect> getActivePotionEffects();
+
+ /**
+ * Checks whether the entity has block line of sight to another.<br />
+ * This uses the same algorithm that hostile mobs use to find the closest player.
+ *
+ * @param other The entity to determine line of sight to.
+ * @return true if there is a line of sight, false if not.
+ */
+ public boolean hasLineOfSight(Entity other);
}