Chat colors not working for me
jmgraeffe opened this issue · comments
Jon-Mailes Graeffe commented
Hey, thanks for the awesome work!
I can't figure out why chat colors are not working for my plugins but for others they just work with the same code.
I tested the following methods, using 1.0.179 of CSSharp and JetBrains Rider 2023 as IDE:
[...]
AddCommand("css_test", "", (player, info) =>
{
player!.PrintToChat($"{ChatColors.DarkRed}test");
Server.PrintToChatAll($"{ChatColors.Red}test");
info.ReplyToCommand($"{ChatColors.Green}test");
player!.PrintToChat(ChatColors.DarkRed + "test");
Server.PrintToChatAll(ChatColors.Red + "test");
info.ReplyToCommand(ChatColors.Green + "test");
}
[...]
Everything is just white. Any idea? I'm sure it's something simple that I do different than you all.
Thanks in advance!
Nexd commented
first character cannot be a color code, add a space in the beginning (if it hasn't been patched already)
Jon-Mailes Graeffe commented
That's it. Thank you!