diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/config/PlayerData.java b/core/src/main/java/io/github/dre2n/dungeonsxl/config/PlayerData.java index 47718931..7f678761 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/config/PlayerData.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/config/PlayerData.java @@ -58,7 +58,7 @@ public class PlayerData extends BRConfig { private ItemStack oldOffHand; private int oldLvl; private float oldExp; - private double oldHealthScale; + private double oldMaxHealth; private double oldHealth; private int oldFoodLevel; private int oldFireTicks; @@ -176,18 +176,18 @@ public class PlayerData extends BRConfig { } /** - * @return the old health scale + * @return the old max health */ - public double getOldHealthScale() { - return oldHealthScale; + public double getOldMaxHealth() { + return oldMaxHealth; } /** - * @param healthScale - * the healthScale to set + * @param maxHealth + * the maximum health to set */ - public void setOldHealthScale(double healthScale) { - oldHealthScale = healthScale; + public void setOldMaxHealth(double maxHealth) { + oldMaxHealth = maxHealth; } /** @@ -342,7 +342,7 @@ public class PlayerData extends BRConfig { oldLvl = config.getInt(PREFIX_STATE_PERSISTENCE + "oldLvl"); oldExp = config.getInt(PREFIX_STATE_PERSISTENCE + "oldExp"); - oldHealthScale = config.getDouble(PREFIX_STATE_PERSISTENCE + "oldHealthScale"); + oldMaxHealth = config.getDouble(PREFIX_STATE_PERSISTENCE + "oldMaxHealth"); oldHealth = config.getDouble(PREFIX_STATE_PERSISTENCE + "oldHealth"); oldFoodLevel = config.getInt(PREFIX_STATE_PERSISTENCE + "oldFoodLevel"); oldFireTicks = config.getInt(PREFIX_STATE_PERSISTENCE + "oldFireTicks"); @@ -376,7 +376,7 @@ public class PlayerData extends BRConfig { oldGameMode = player.getGameMode(); oldFireTicks = player.getFireTicks(); oldFoodLevel = player.getFoodLevel(); - oldHealthScale = player.getHealthScale(); + oldMaxHealth = player.getMaxHealth(); oldHealth = player.getHealth(); oldExp = player.getExp(); oldLvl = player.getLevel(); @@ -391,7 +391,7 @@ public class PlayerData extends BRConfig { config.set(PREFIX_STATE_PERSISTENCE + "oldGameMode", oldGameMode.toString()); config.set(PREFIX_STATE_PERSISTENCE + "oldFireTicks", oldFireTicks); config.set(PREFIX_STATE_PERSISTENCE + "oldFoodLevel", oldFoodLevel); - config.set(PREFIX_STATE_PERSISTENCE + "oldHealthScale", oldHealthScale); + config.set(PREFIX_STATE_PERSISTENCE + "oldMaxHealth", oldMaxHealth); config.set(PREFIX_STATE_PERSISTENCE + "oldHealth", oldHealth); config.set(PREFIX_STATE_PERSISTENCE + "oldExp", oldExp); config.set(PREFIX_STATE_PERSISTENCE + "oldLvl", oldLvl); @@ -411,7 +411,7 @@ public class PlayerData extends BRConfig { oldGameMode = null; oldFireTicks = 0; oldFoodLevel = 0; - oldHealthScale = 0; + oldMaxHealth = 20; oldHealth = 0; oldExp = 0; oldLvl = 0; diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/player/DGlobalPlayer.java b/core/src/main/java/io/github/dre2n/dungeonsxl/player/DGlobalPlayer.java index 21b4adf4..11b2b1e6 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/player/DGlobalPlayer.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/player/DGlobalPlayer.java @@ -281,7 +281,7 @@ public class DGlobalPlayer { } player.setLevel(data.getOldLevel()); player.setExp(data.getOldExp()); - player.setHealthScale(data.getOldHealthScale()); + player.setMaxHealth(data.getOldMaxHealth()); player.setHealth(data.getOldHealth()); player.setFoodLevel(data.getOldFoodLevel()); player.setGameMode(data.getOldGameMode()); diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/player/DInstancePlayer.java b/core/src/main/java/io/github/dre2n/dungeonsxl/player/DInstancePlayer.java index 22e4e5f4..7c78c543 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/player/DInstancePlayer.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/player/DInstancePlayer.java @@ -83,7 +83,7 @@ public abstract class DInstancePlayer extends DGlobalPlayer { player.getInventory().setArmorContents(null); player.setTotalExperience(0); player.setLevel(0); - player.setHealthScale(20); + player.setMaxHealth(20); player.setHealth(20); player.setFoodLevel(20); for (PotionEffect effect : player.getActivePotionEffects()) {