From 77a12d4dceb9401449bf4a851acf2ee44559ee1b Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 14 Jan 2012 14:49:41 +0000 Subject: [PATCH] Correct casting for creature target typechecking --- src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java index f0d45c4704..aa8bdb3b09 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java @@ -24,7 +24,7 @@ public class CraftCreature extends CraftLivingEntity implements Creature { public CraftLivingEntity getTarget() { if (getHandle().target == null) return null; - if (!(getHandle().target instanceof CraftLivingEntity)) return null; + if (!(getHandle().target instanceof EntityLiving)) return null; return (CraftLivingEntity) getHandle().target.getBukkitEntity(); }