Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 21:10:10 +01:00
Correct casting for creature target typechecking
Dieser Commit ist enthalten in:
Ursprung
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();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren