mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-01-03 13:57:36 +01:00
Fixed issue with improper casting.
This commit is contained in:
parent
31bb754444
commit
30e1ccabb6
@ -20,7 +20,9 @@ public class HealthMechanic implements IBossMechanic {
|
||||
public boolean applyMechanic(BossEntity bossEntity, ActiveBossHolder activeBossHolder) {
|
||||
if (activeBossHolder.getLivingEntityMap().getOrDefault(1, null) == null) return false;
|
||||
|
||||
double maxHealthSetting = (double) SpigotYmlReader.get().getObject("settings.attribute.maxHealth.max");
|
||||
Object o = SpigotYmlReader.get().getObject("settings.attribute.maxHealth.max");
|
||||
|
||||
double maxHealthSetting = o instanceof Double ? (double) o : (double) (int) o;
|
||||
|
||||
for (EntityStatsElement entityStatsElement : bossEntity.getEntityStats()) {
|
||||
MainStatsElement mainStatsElement = entityStatsElement.getMainStats();
|
||||
|
Loading…
Reference in New Issue
Block a user