Skip to content

Don't track entity if PlayerTrackEntityEvent is cancelled - #14282

Closed
roccodev wants to merge 1 commit into
PaperMC:mainfrom
roccodev:fix/track-events
Closed

roccodev wants to merge 1 commit into
PaperMC:mainfrom
roccodev:fix/track-events

Conversation

@roccodev

@roccodev roccodev commented Sep 19, 2026 •

Copy link
Copy Markdown

Fixes #14280

Apparently it was also the case that when PlayerTrackEntityEvent is cancelled, the entity still actually gets tracked, it's really just the spawn packet and the initial entity data/movement/etc. that's sent with it that would get cancelled. This would for example mean that when cancelling the event, plugins like ViaVersion would get confused because they'd receive packets for an entity that's not tracked.

It's worth noting that this breaks plugins that would e.g. cancel the event and then later spawn the entity themselves with packets, it would previously work because the entity was still tracked under the hood, they will now need to call hidePlayer and showPlayer, or re-track the entity internally. I doubt that such a setup would have been supported anyway.

@roccodev
roccodev requested a review from a team as a code owner September 19, 2026 21:03
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Sep 19, 2026
@roccodev
roccodev marked this pull request as draft September 19, 2026 21:16
@roccodev
roccodev marked this pull request as ready for review September 19, 2026 21:22
@roccodev

Copy link
Copy Markdown
Author

Ohh I just saw #12320, it didn't come up in searches, apologies.

@roccodev roccodev closed this Sep 19, 2026
@github-project-automation github-project-automation Bot moved this from Awaiting review to Closed in Paper PR Queue Sep 19, 2026
roccodev added a commit to ProjectKig/KigPaper-NG that referenced this pull request Sep 20, 2026
Port of PaperMC#14282, fix for PaperMC#14280

as a feature patch cause this was hell to rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

Entity#getTrackedBy includes players whose tracking was cancelled

1 participant