From 23610ad9f119ece9f93807167c9429dbb280a1c8 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sat, 30 Mar 2013 20:47:00 +0800 Subject: [PATCH] Add setTarget(Entity) to Navigator --- .../java/net/citizensnpcs/api/ai/Navigator.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/net/citizensnpcs/api/ai/Navigator.java b/src/main/java/net/citizensnpcs/api/ai/Navigator.java index 735d0834..af7a00ae 100644 --- a/src/main/java/net/citizensnpcs/api/ai/Navigator.java +++ b/src/main/java/net/citizensnpcs/api/ai/Navigator.java @@ -3,6 +3,7 @@ import net.citizensnpcs.api.npc.NPC; import org.bukkit.Location; +import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; /** @@ -68,6 +69,16 @@ public interface Navigator { */ boolean isNavigating(); + /** + * Sets the current navigation to an entity target. + * + * @param target + * The {@link Entity} to path towards + * @param aggressive + * Whether to attack the target when close enough + */ + void setTarget(Entity target, boolean aggressive); + /** * Sets the current navigation to an entity target. * @@ -75,7 +86,9 @@ public interface Navigator { * The {@link LivingEntity} to path towards * @param aggressive * Whether to attack the target when close enough + * @deprecated See {@link #setTarget(Entity, boolean)} */ + @Deprecated void setTarget(LivingEntity target, boolean aggressive); /**