Skip to content

Remove extractUrls from default legacy serializer#6492

Merged
JRoy merged 3 commits intoEssentialsX:2.xfrom
JRoy:fix/discord-command-url-encoding
Apr 5, 2026
Merged

Remove extractUrls from default legacy serializer#6492
JRoy merged 3 commits intoEssentialsX:2.xfrom
JRoy:fix/discord-command-url-encoding

Conversation

@JRoy
Copy link
Copy Markdown
Member

@JRoy JRoy commented Apr 5, 2026

extractUrls on the default LegacyComponentSerializer caused
legacyToMini to auto-wrap URLs in click:open_url tags. When
translation templates like discordCommandLink already wrapped {0}
in their own click tag, this produced nested click events that
Paper 1.21.11+ rejected.

The default serializer no longer extracts URLs. A new
legacyToMiniWithUrls method is available for cases that explicitly
need clickable URL extraction (chat, broadcast).

Fixes #6463

JRoy added 3 commits April 5, 2026 11:52
extractUrls on the default LegacyComponentSerializer caused
legacyToMini to auto-wrap URLs in <click:open_url> tags. When
translation templates like discordCommandLink already wrapped {0}
in their own click tag, this produced nested click events that
Paper 1.21.11+ rejected.

The default serializer no longer extracts URLs. A new
legacyToMiniWithUrls method is available for cases that explicitly
need clickable URL extraction (chat, broadcast).

Fixes EssentialsX#6463
Broadcast messages and chat spy output should have clickable URLs,
so use the URL-extracting serializer for user message content in
/broadcast, /broadcastworld, and local chat spy.
@JRoy JRoy added this pull request to the merge queue Apr 5, 2026
Merged via the queue into EssentialsX:2.x with commit fb669aa Apr 5, 2026
1 check passed
@JRoy JRoy deleted the fix/discord-command-url-encoding branch April 5, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EssentialsDiscord throwing error on /discord command

2 participants