From f0f27689370ec0ff777e66e0875d1296b4cbb66a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 9 Feb 2011 13:44:57 +0000 Subject: [PATCH] Added Creature.getTarget By: Dinnerbone --- .../main/java/org/bukkit/entity/Creature.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/entity/Creature.java b/paper-api/src/main/java/org/bukkit/entity/Creature.java index 01a025bfb5..2589f4c902 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Creature.java +++ b/paper-api/src/main/java/org/bukkit/entity/Creature.java @@ -1,17 +1,23 @@ package org.bukkit.entity; /** - * Represents a Creature. Any LivingEntity that is not human is a Creature. - * @author Cogito - * + * Represents a Creature. Creatures are non-intelligent monsters or animals which + * have very simple abilities. */ -public interface Creature extends LivingEntity{ +public interface Creature extends LivingEntity { /** * Instructs this Creature to set the specified LivingEntity as its target. * Hostile creatures may attack their target, and friendly creatures may * follow their target. * - * @param target New LivingEntity to target + * @param target New LivingEntity to target, or null to clear the target */ public void setTarget(LivingEntity target); + + /** + * Gets the current target of this Creature + * + * @return Current target of this creature, or null if none exists + */ + public LivingEntity getTarget(); }