mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-03-12 06:29:30 +01:00
Another attempt at fixing the health mechanic.
This commit is contained in:
parent
39be1c2996
commit
b29dffc912
@ -20,9 +20,8 @@ public class HealthMechanic implements IBossMechanic {
|
||||
public boolean applyMechanic(BossEntity bossEntity, ActiveBossHolder activeBossHolder) {
|
||||
if (activeBossHolder.getLivingEntityMap().getOrDefault(1, null) == null) return false;
|
||||
|
||||
Object o = SpigotYmlReader.get().getObject("settings.attribute.maxHealth.max");
|
||||
|
||||
double maxHealthSetting = o instanceof Double ? (double) o : (double) (int) o;
|
||||
double maxHealthSetting = Double.valueOf( SpigotYmlReader
|
||||
.get().getObject("settings.attribute.maxHealth.max").toString());
|
||||
|
||||
for (EntityStatsElement entityStatsElement : bossEntity.getEntityStats()) {
|
||||
MainStatsElement mainStatsElement = entityStatsElement.getMainStats();
|
||||
|
Loading…
Reference in New Issue
Block a user