mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-14 03:41:34 +01:00
Correct casting for creature target typechecking
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
b7d840939b
commit
cbd712ca33
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue