From b29dffc912b7b733611a3187c5c8ac8f85bb5a03 Mon Sep 17 00:00:00 2001 From: songoda Date: Thu, 16 Jan 2020 21:42:23 -0500 Subject: [PATCH] Another attempt at fixing the health mechanic. --- .../songoda/epicbosses/mechanics/boss/HealthMechanic.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/HealthMechanic.java b/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/HealthMechanic.java index 059360e..3e5d2fb 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/HealthMechanic.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/HealthMechanic.java @@ -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();