Skip to content

Strip color codes from messages where they aren't supported anymore#6438

Merged
valaphee merged 1 commit into
GeyserMC:masterfrom
valaphee:strip-color-codes
Jun 2, 2026
Merged

Strip color codes from messages where they aren't supported anymore#6438
valaphee merged 1 commit into
GeyserMC:masterfrom
valaphee:strip-color-codes

Conversation

@valaphee
Copy link
Copy Markdown
Member

@valaphee valaphee commented Jun 1, 2026

Closes #6426

Copilot AI review requested due to automatic review settings June 1, 2026 10:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Bedrock clients no longer supporting color formatting in certain UI contexts (notably the disconnect screen), by converting formatted/legacy text into plain text before it is displayed.

Changes:

  • Convert Java server ping description (passthrough MOTD) to plain text before splitting into MOTD/sub-MOTD lines.
  • Convert disconnect reason Component to plain text before passing it through the SessionDisconnectEvent API.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java Uses plain-text conversion for passthrough MOTD derived from Java ping description.
core/src/main/java/org/geysermc/geyser/event/type/SessionDisconnectEventImpl.java Ensures disconnect reasons passed to the event/UI are plain text (no formatting codes).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java Outdated
Comment thread core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java Outdated
@valaphee valaphee force-pushed the strip-color-codes branch from 1c39c1c to 2d86055 Compare June 2, 2026 07:43
@valaphee valaphee merged commit 53b5842 into GeyserMC:master Jun 2, 2026
2 checks passed
@valaphee valaphee deleted the strip-color-codes branch June 2, 2026 07: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.

Colors in the disconnect popup

3 participants