Skip to content

Comments

Fix NPE when unsetting leash holder in EntityUnleashEvent#13648

Open
datatags wants to merge 1 commit intoPaperMC:mainfrom
datatags:fix-leash-holder-npe
Open

Fix NPE when unsetting leash holder in EntityUnleashEvent#13648
datatags wants to merge 1 commit intoPaperMC:mainfrom
datatags:fix-leash-holder-npe

Conversation

@datatags
Copy link

This resolves #13645, where a NPE may result if a plugin unsets the leash holder of the entity in question during the EntityUnleashEvent. This is resolved by simply checking if the leashHolder is null before attempting to play the sound.

@datatags datatags requested a review from a team as a code owner February 21, 2026 22:31
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Feb 21, 2026
@Doc94
Copy link
Member

Doc94 commented Feb 21, 2026

This now ignore the dropLeash set when unset?

@datatags datatags force-pushed the fix-leash-holder-npe branch from 58fdc7d to df9684c Compare February 21, 2026 22:53
@datatags
Copy link
Author

Oops, didn't mean to move that line, fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

Unsetting leash holder in EntityUnleashEvent causes NPE

2 participants