diff --git a/bukkit/src/main/java/net/william278/husksync/bukkit/util/PlayerSetter.java b/bukkit/src/main/java/net/william278/husksync/bukkit/util/PlayerSetter.java index ec819ed6..d0dbe3f2 100644 --- a/bukkit/src/main/java/net/william278/husksync/bukkit/util/PlayerSetter.java +++ b/bukkit/src/main/java/net/william278/husksync/bukkit/util/PlayerSetter.java @@ -464,12 +464,13 @@ public class PlayerSetter { */ private static void setPlayerHealth(Player player, double health, double maxHealth, double healthScale) { // Set max health - if (maxHealth != 0.0D) { + if (maxHealth != 0D) { Objects.requireNonNull(player.getAttribute(Attribute.GENERIC_MAX_HEALTH)).setBaseValue(maxHealth); } // Set health - player.setHealth(player.getHealth() > maxHealth ? maxHealth : health); + double currentHealth = player.getHealth(); + if (health != currentHealth) player.setHealth(currentHealth > maxHealth ? maxHealth : health); // Set health scaling if needed if (healthScale != 0D) {