13
0
geforkt von Mirrors/Paper

Fixed any chance of creatures .getTarget throwing a class cast exception - thanks to an old PR by garbagemule!

By: Nathan Adams <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2012-01-14 14:45:56 +00:00
Ursprung e75caa842b
Commit b7d840939b

Datei anzeigen

@ -24,6 +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;
return (CraftLivingEntity) getHandle().target.getBukkitEntity();
}