kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
43 stars 22 forks source link

Custom rules, how to NOT replace HEX color codes? #2669

Closed HielkeMaps closed 2 months ago

HielkeMaps commented 2 months ago

Are you using MySQL?

Yes

Are you using BungeeCord/Velocity?

Yes - BungeeCord

Question

So I have a rule to convert <r text> to rainbow text (works with ItemsAdder) The plugin I'm working with requires MiniMessage.

The problem? ChatControl-Red replaces the #FFFFFE with §x§F§F§F§F§F§E, no matter WHAT I do. This of course crashes the plugin because <§x§F§F§F§F§F§E>text<reset> is not valid.

Is there any way to do this?

My rule:

match <r\s([^>]+)>
require perm ia.user.text_effect.chat
strip colors false
then replace <#FFFFFE>$1<reset>

I tried string escaping, messing with strip colors & strip format, surrounding it with strings. Nothing works.

I need <#FFFFFE>text<reset>, not <§x§F§F§F§F§F§E>text<reset>

kangarko commented 2 months ago

I am sorry, this is incompatible for now. What you could do is give players negative permissions for colors to avoid us replacing them. https://github.com/kangarko/ChatControl-Red/wiki/Permissions#tip-color-permissions