Skip to content

Commit

Permalink
Fix hp keep_full_on_increase not working sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
Archy-X committed Jun 29, 2024
1 parent b3c2705 commit 54f97e2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ private void setHealth(Player player, User user) {
}
if (trait.optionBoolean("keep_full_on_increase", false) && attribute.getValue() > originalMaxHealth) {
// Heals player to full health if had full health before modifier
if (player.getHealth() >= originalMaxHealth) {
final double THRESHOLD = 0.01;
if (player.getHealth() >= originalMaxHealth - THRESHOLD) {
player.setHealth(attribute.getValue());
}
}
Expand Down

0 comments on commit 54f97e2

Please sign in to comment.