Fix stamina casting exception

This commit is contained in:
KingRainbow44
2023-06-01 03:27:48 -04:00
parent 98375deac9
commit 6e5971df62

View File

@@ -317,7 +317,9 @@ public class StaminaManager extends BasePlayerManager {
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_CUR_HP));
entity.getWorld().broadcastPacket(new PacketLifeStateChangeNotify(0, entity, LifeState.LIFE_DEAD));
player.getScene().removeEntity(entity);
((EntityAvatar) entity).onDeath(dieType, 0);
if (entity instanceof EntityAvatar avatar)
avatar.onDeath(dieType, 0);
}
public void startSustainedStaminaHandler() {