From 71ca7ffbf6c36c9fd18cf61056295dca4a733f62 Mon Sep 17 00:00:00 2001 From: DarkLaw <44745161+ImDarkLaw@users.noreply.github.com> Date: Mon, 1 Apr 2024 01:53:53 +0300 Subject: [PATCH] Fix heal signs not healing up to the player's max health (#5752) --- .../src/main/java/com/earth2me/essentials/signs/SignHeal.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/signs/SignHeal.java b/Essentials/src/main/java/com/earth2me/essentials/signs/SignHeal.java index f5eadaf2aaf..4f2856dad0a 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/signs/SignHeal.java +++ b/Essentials/src/main/java/com/earth2me/essentials/signs/SignHeal.java @@ -21,9 +21,10 @@ protected boolean onSignInteract(final ISign sign, final User player, final Stri if (player.getBase().getHealth() == 0) { throw new SignException("healDead"); } + final double amount = player.getBase().getMaxHealth(); final Trade charge = getTrade(sign, 1, ess); charge.isAffordableFor(player); - player.getBase().setHealth(20); + player.getBase().setHealth(amount); player.getBase().setFoodLevel(20); player.getBase().setFireTicks(0); player.sendTl("youAreHealed");