mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 11:38:29 +01:00
Correct casting for creature target typechecking
This commit is contained in:
parent
e6bb19f63a
commit
77a12d4dce
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user