geforkt von Mirrors/Paper
Fixed any chance of creatures .getTarget throwing a class cast exception - thanks to an old PR by garbagemule!
Dieser Commit ist enthalten in:
Ursprung
3d31c27864
Commit
e6bb19f63a
@ -24,6 +24,7 @@ public class CraftCreature extends CraftLivingEntity implements Creature {
|
|||||||
|
|
||||||
public CraftLivingEntity getTarget() {
|
public CraftLivingEntity getTarget() {
|
||||||
if (getHandle().target == null) return null;
|
if (getHandle().target == null) return null;
|
||||||
|
if (!(getHandle().target instanceof CraftLivingEntity)) return null;
|
||||||
|
|
||||||
return (CraftLivingEntity) getHandle().target.getBukkitEntity();
|
return (CraftLivingEntity) getHandle().target.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren