From 0052c3c5a767adde7a333bdda46629971bc3edb9 Mon Sep 17 00:00:00 2001 From: Redrield Date: Sat, 26 Mar 2016 01:41:20 -0400 Subject: SPIGOT-213: Add method to enable / disable AI for mobs --- src/main/java/org/bukkit/entity/LivingEntity.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index 3582d2ff..8827c6c7 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -381,4 +381,17 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti */ public void setGliding(boolean gliding); + /** + * Sets whether an entity will have AI. + * + * @param ai whether the mob will have AI or not. + */ + void setAI(boolean ai); + + /** + * Checks whether an entity has AI. + * + * @return true if the entity has AI, otherwise false. + */ + boolean hasAI(); } -- cgit v1.2.3