Skip to content

Fix PlayerLinksSendEvent not firing when no global links are configured#14026

Open
noctiro wants to merge 1 commit into
PaperMC:mainfrom
noctiro:fix/player-links-send-event-always-fire
Open

Fix PlayerLinksSendEvent not firing when no global links are configured#14026
noctiro wants to merge 1 commit into
PaperMC:mainfrom
noctiro:fix/player-links-send-event-always-fire

Conversation

@noctiro

@noctiro noctiro commented Jul 3, 2026

Copy link
Copy Markdown

Problem

PlayerLinksSendEvent is gated behind an isEmpty() check on the server's global ServerLinks. This means the event is never fired when no global links are configured, making it impossible for plugins to add per-player links from scratch without a workaround.

Plugins that want to show player-specific links (e.g. localized links based on client language) are currently forced to pre-populate the global ServerLinks with dummy entries just to make the event trigger — even though those global entries are irrelevant and must then be cleared inside the event handler.

Solution

Remove the isEmpty() guard before the event, and move it to after the event has been processed. The event now always fires, and the packet is only sent if the resulting ServerLinks is non-empty (either from global config or from plugin modifications).

@noctiro noctiro requested a review from a team as a code owner July 3, 2026 03:33
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jul 3, 2026
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.

1 participant