[Question}Checking formatting codes?
rayblon opened this issue · 4 comments
Heyo. I've been trying to use formatting codes to detect otherwise highly variable messages sent to the client -- messages from magicspells and otherwise, where the only thing they have in common is the formatting codes prefixing them. How do you detect the formatting codes, or is it not currently possible?
I think currently it is possible and should just work as normal (see https://minecraft.gamepedia.com/Formatting_codes) - however, formatting codes being present in filter checks is actually a bug that is going to be fixed in the Minecraft 1.13/1.14 port (see #47).
Starting then, the only way to detect those kind of messages would be by defining them in the filter one-by-one, or through a separate addon that bundles those kind of messages to a specific channel (kinda like the system/action messages channels provided by Chat Tweaks right now).
I think what I will do is to keep the formatting codes in as long as the formatting code character ("§") appears in the filter.
Which reminds me, I'm not sure if you can type the character in the GUI, since Minecraft is really weird about it. You may have to manually edit the views.json file to add it to the filter.
Yeah, though adding it to the JSON directly causes a crash, and the escape code \u00A7 added to the config doesn't seem to translate into the character, from what I've seen