Migrate and overhaul heal event and heal amount expression - #8796
Open
MrScopes wants to merge 11 commits into
Open
Migrate and overhaul heal event and heal amount expression#8796MrScopes wants to merge 11 commits into
MrScopes wants to merge 11 commits into
Conversation
MrScopes
requested review from
APickledWalrus and
sovdeeth
and removed request for
a team
July 27, 2026 01:45
Member
|
tests failing |
Contributor
Author
ahh that's because I didn't account for skript using health and not hp |
Contributor
Author
|
I'm changing the scope of this pr to migrate exprhealreason, exprhealamount, and heal event to player module |
AnOwlBe
reviewed
Jul 28, 2026
| "\tcancel event" | ||
| ) | ||
| .since("1.0, 2.9.0 (by reason)"); | ||
| public static void register(SyntaxRegistry syntaxRegistry, EventValueRegistry registry) { |
Contributor
There was a problem hiding this comment.
I already migrated this (https://github.com/SkriptLang/Skript/pull/8748/changes#diff-5dc1b4cdab125cd303ada3ff87ae57c8026a98762768cc6f91529578a372787c) so probably no reason to also migrate it here
sovdeeth
requested changes
Jul 28, 2026
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Currently, heal uses a utility that just set's their health to their current health + the heal amount
this does not call EntityRegainHealthEvent
Also, in the EntityRegainHealthEvent it doesn't take into account Skript using health (10 hearts) instead of hp (20hp), so heal-amount is hp and not hearts.
This is inconsistent with the rest of the code base.
Also, migrating the current system to the new module system.
Update HealUtils to use Damageable.heal instead of setHealth
The reason this was made in the first place is because Spigot has never and still doesn't have a Damageale.heal but now that Skript is paper only, this is appropriate
Testing
currently, heal amount tested with
here's the current test for the heal event as well

migrated heal reason test

Completes: none
Related: none
AI assistance: none