Fix heal signs not healing up to the player's max health (#5752)

This commit is contained in:
DarkLaw 2024-04-01 01:53:53 +03:00 committed by GitHub
parent 76a513a05c
commit 71ca7ffbf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,9 +21,10 @@ public class SignHeal extends EssentialsSign {
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");