Skip to content

Commit

Permalink
Use player's max health instead of the default health value on heal s…
Browse files Browse the repository at this point in the history
…ign interaction
  • Loading branch information
ImDarkLaw committed Mar 31, 2024
1 parent 76a513a commit feb14c9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit feb14c9

Please sign in to comment.