RGB colors in MOTD not supported when player is kicked
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
Paper supports RGB color codes in the MOTD that is displayed in the client's server list. This is an extension on vanilla servers which don't support RGB in MOTD at all. The MOTD should behave consistently and keep the defined colors regardless of how a player disconnects.
Observed/Actual behavior
When a player is kicked from the server, the server's MOTD falls back to vanilla colors which messes up the RGB codes in the MOTD definition. Refreshing the server list fixes the colors per Paper's RGB support. When a player disconnects from the server voluntarily, the RGB colors are also respected. It points to the fact that when a player is kicked by the server, a packet is sent which updates the MOTD but the method for displaying colors here is different from the usual one which Paper uses.
Steps/models to reproduce
- Connect to a 1.19 server which uses RGB codes in MOTD
- Disconnect
- The RGB colors in the MOTD are OK
- Connect again
- Get kicked by the server
- The MOTD's colors are broken
- Refresh the server list
- The RGB colors in the MOTD are OK
Plugin and Datapack List
Plugins (28): ChatBubbles, Chunky, CoreProtect, DecentHolograms, dynmap, Essentials, EssentialsChat, EssentialsDiscord, EssentialsGeoIP, EssentialsProtect, EssentialsSpawn, floodgate, Geyser-Spigot, GSit, LuckPerms, LWC, Multiverse-Core, Multiverse-Inventories, Multiverse-NetherPortals, OpenInv, QuickChannels, Simple-Playerlist, SkQuery, Skript, Vault, WorldEdit, WorldEditSUI, WorldGuard
There are 3 data packs enabled: [vanilla (built-in)], [file/bukkit (world)], [file/kamienok (world)]
There are no more data packs available
(Custom datapack only for custom recipes)
Paper version
[14:59:13 INFO]: This server is running Paper version git-Paper-40 (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) (Git: 0d79b86)
You are running the latest version
Previous version: git-Paper-34 (MC: 1.19)
Other
A recent issue was fixed by changing how MOTD is parsed. Maybe this could also be implemented in the new way servers send packets after kicking.
Vanilla 1.19 introduced something related (taken from the release announcement changelog):
Servers will now also send an additional icon and MOTD packet after a player has connected
This allows servers with enable-status=false to set an icon and MOTD for players that successfully connect
This might be a longshot but I also found a bug report in Velocity with a similar description, also the new vanilla MOTD behavior is mentioned in the comments.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue on a 1.19 Paper server using RGB MOTD codes, comparing voluntary disconnects with server kicks. Start by reviewing issue #8036 and commit 147a2b7f54a077447ba5afd74e4f921b497f5205, then trace the additional icon and MOTD packet sent after a player connects. Done means kicked players retain the same RGB MOTD colors without requiring a server-list refresh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100