clientcommands
clientcommands copied to clipboard
Add FormattedComponentArgument for /cwe
I rewrote FormattedTextArgumentType
. The previous implementation was too verbose and moreover not working as one might have expected it to. This new syntax is less error prone and probably more intuitive to work with. The availability of some text styles have been dropped, as firstly the previous implementation was incomplete and secondly because this argument type is meant to provide Formatting
ed text, not Style
d text. Aside from what's available in the Formatting
class, I did decide to add hex colour support through the #
prefix with lenient hex parsing. Do note that Style
d text is still available using the /ctellraw
command.
Hmm, could we leave in some of the old syntax as an alternative to the new syntax, so that those of us who haven't memorized formatting codes can still use it?
I think that will get a bit confusing. What about making this into a separate class? Something like LegacyFormattedTextArgumentType
. Then the /cnote
command would just remain as is. My intentions for this class were to use this formatting syntax to be able to write formatted messages over C2C packets in a very compact and non distracting way. Being spammed with formatting suggestions all the time would get annoying if one just wanted to send a simple message.