Heal signs do not account for custom max health values #5751
Labels
bug: confirmed
Confirmed bugs in EssentialsX.
status: open to PR
Low priority enhancements that anyone is welcome to contribute.
Type of bug
Other unexpected behaviour
/ess dump all
outputhttps://essentialsx.net/dump.html?id=4d77c9610f5d470ab46f0142b21415fd
Error log (if applicable)
No response
Bug description
The onSignInteract method inside the SignHeal class responsible for handling interactions with heal signs, currently, sets the player's health to 20 without considering potential increases in amount of health due to the generic max health attribute.
Steps to reproduce
Suggested course of action to reproduce this behavior:
/attribute @p minecraft:generic.max_health base set 40
to change our base maximum health value, in this case, doubling it to 40.Expected behaviour
One would expect that onSignInteract the player's health would be set to the maximum amount respecting modified maximum health values.
Actual behaviour
Upon interacting with a heal sign, health value is being set to 20 no matter what, without accounting for an increased amount of hearts.
Additional Information
No response
The text was updated successfully, but these errors were encountered: