Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entity heal API #10267

Merged
merged 5 commits into from
May 30, 2024
Merged

Add entity heal API #10267

merged 5 commits into from
May 30, 2024

Conversation

TotalledZebra
Copy link
Contributor

I haven't contributed to Paper yet so I'm not sure if this is all correct. I feel like this is useful since healing an entity is a pretty common use case and there already is a heal method in NMS.

@TotalledZebra TotalledZebra requested a review from a team as a code owner February 19, 2024 18:30
@TotalledZebra
Copy link
Contributor Author

I've added the missing annotations required by the tests. However after some discussion on Discord I believe the healing either needs to happen without calling an event or there needs to be some sort of flag to control whether or not the EntityRegainHealthEvent is called.

Copy link
Contributor

@notTamion notTamion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its fine to call the event here considering that Damageable#damage also calls the event iirc

patches/api/0465-Add-entity-heal-API.patch Outdated Show resolved Hide resolved
@kashike kashike added the type: feature Request for a new Feature. label Apr 29, 2024
@lynxplay lynxplay merged commit 3181470 into PaperMC:master May 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Request for a new Feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants