kangarko / ChatControl-Pro

The ultimate chat solution. Prevent spam, ads, swears and even bots on your server. Replaced by ChatControl Red: https://mineacademy.org/chatcontrol-red
Other
65 stars 8 forks source link

Chat HEX code allow & to be included #2284

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, I have come across an issue related to the new RGB hex codes, however I couldn't justify it as a bug really.

LuckPerms, DeluxeMenus, HolographicDisplays, Essentials and I'm sure many others, use the format &#(colour code) in order to use the RGB colours however ChatControl only uses #(colour color). This means that when I configure LuckPerms to a specific Prefix, I must choose to configure it without & since otherwise it will be shown in chat as &(prefix), however this then causes issues with other plugins which required the & sign to display the correct colour..

I should note that LuckPerms doesn't exactly need to "support" the colours in any way since it doens't need to use them themselves, and just "passes" them on I suppose. However I mention it because when viewing the prefixes with for example /lp group (group) meta info, it won't show the colours unless you include the & sign.

I know for example that the TAB plugin supports both versions and it would be wonderful if ChatControl could have this as well. I am sure that I can't be the only one who has ran into this issue.

I was specifically hoping to use the %vaultrankprefix(rank)% placeholder to display all rank prefixes in a DeluxeMenus menu easily. I also wanted to use it for a holographic informational area where information regarding the ranks would be provided.

If this feature is not included, I will have to fill in the prefixes manually and update them manually if I later on make changes. By all means this is not unreasonable, however I feel it's not quite right that vault and luckperms provided placeholders won't work in many places because I was limited in my rank configuring by ChatControl due to the plugin only supporting one hex code format.

I suppose ChatControl could be using the "right" format, however from my experience it appears like requiring or at the very least allowing the & sign is the more common practice among other plugins.

TLDR; My suggestion is to support #(color code) as well as &#(color code).

PS. Thanks for an otherwise amazing plugin. I've used it for years.

ghost commented 3 years ago

I realize now that ChatControl Pro is being replaced by ChatControl Red. If ChatControl Red supports what I seek, I will be more than happy purchasing it. Or you could be cheeky and add it there but not here and I'll move anyways :,)

kangarko commented 3 years ago

Thanks! Nope, we only support #(color) format due to performance. Every time a message is parsed it would literally half the performance if we were to check two formats instead of one.