From 7401ee54a3ae33dd14d13ae7253977b1364abe5e Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Wed, 9 Feb 2011 13:44:46 +0000 Subject: [PATCH] Added Creature.getTarget --- .../java/org/bukkit/craftbukkit/entity/CraftCreature.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java index 09e15c13db..d881c0e821 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java @@ -24,6 +24,14 @@ public class CraftCreature extends CraftLivingEntity implements Creature{ } } + public CraftLivingEntity getTarget() { + if (entity.d == null) { + return null; + } else { + return (CraftLivingEntity)entity.d.getBukkitEntity(); + } + } + @Override public EntityCreature getHandle() { return entity;