Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toMotd uses non-standard (well, not supported by the notchian client) hex notation #84

Open
ChipmunkMC opened this issue Oct 17, 2022 · 1 comment

Comments

@ChipmunkMC
Copy link
Contributor

ChipmunkMC commented Oct 17, 2022

The toMotd method of ChatMessage uses §#rrggbb notation for hex colors, which is non-standard. When §#123456a is rendered by the notchian client, it appears as 123456a (because the character after a section sign always gets hidden, regardless of whether it is a valid color code). Please consider using the color code of the nearest color instead. Also, for toAnsi you should consider not wrapping toMotd if you want it to support hex colors. A problem caused by toAnsi wrapping toMotd and handling §#rrggbb hex colors is that it causes messages such as {"text":"§#123456a"} to get colored (such messages are uncommon, but they can exist).

@Parker2991
Copy link

so does ansi and html i think

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

No branches or pull requests

2 participants