From 3b73bf14475e49205c79641c055888aa1f9ef6f6 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 9 Feb 2011 13:44:46 +0000 Subject: [PATCH] Added Creature.getTarget By: Dinnerbone --- .../java/org/bukkit/craftbukkit/entity/CraftCreature.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java index 09e15c13db..d881c0e821 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java +++ b/paper-server/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;