mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 06:57:39 +01:00
Fix heal signs not healing up to the player's max health (#5752)
This commit is contained in:
parent
76a513a05c
commit
71ca7ffbf6
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user