ctbe Posted August 28, 2017 Posted August 28, 2017 I was so tired that I accidentally used sendChatMessage(String) instead of sendMessage(ITextComponent) which is what I really needed. (I know, programming while tired is not a good move) However, it surprised me that one cannot use color codes for sendChatMessage as they get filtered and the § character is treated as disallowed. The offender will get disconnected with the message: "Illegal characters in chat" on the screen. Would anyone happen to know of reasons for why sending chat messages with color is disallowed? I don't need to broadcast chat messages with color. I just need to display a colored message to the player performing an action and because said messages can display many times per player it would flood the chat if it is broadcasted. So I'm okay with sendMessage. I mean, imagine if I have 100 players online and at least 50 decide to perform a message displaying action at the same time or with 1-3 seconds of difference. It would be awful for all players to see 50 messages in such a short amount of time flooding their chat. Still, it made me curious as to why it is not allowed to use sendChatMessage with color. (Nothing occurs to me, I hope I am not touching a sensitive subject here, it's just curiosity) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.