Experimental reserialization in chat preview
braxtonhall opened this issue ยท 1 comments
Why?
1.19 adds a previews-chat
in the server properties, where messages may be formatted and presented back to a user before they finish and send the message. A player may want to know what their message will look like when it's broadcast to discord, especially as Minecraft and discord have different text formatting rules.
What and How?
If previews-chat
is enabled, when an unfinished player message is sent to the server, it is serialized using the experimental ToMinecraft serializer. So if a player types **Hello** *World*
in Minecraft, a &lHello&r &oWorld&r
preview is sent back so they can see what it will look like on Discord.
If the server has the ToDiscord serializer enabled, that should also be used on the preview first, so a message formatted like **Hello** &oWorld&r
can correctly be previewed to the player as &lHello&r &oWorld&r
Are there alternatives?
Not that I can think of.
Checks
- I have used the search at least once to check if my idea has already been suggested and perhaps already implemented.
Anything else
No response