kangarko / ChatControl

The most popular chat formatting & filtering plugin for Minecraft.
https://mineacademy.org/chatcontrol
GNU General Public License v3.0
81 stars 38 forks source link

Spigot 1.8.8 <obf> or &k behavior broken #3110

Closed ThisIsALegitUsername closed 1 month ago

ThisIsALegitUsername commented 1 month ago

Are you using MySQL?

No

Are you using a proxy?

Yes - Velocity

"/version ChatControlRed" - plugin version

11.2.4

Optional: Error log

No response

ZIP of "/chc debug"

No response

Steps to reproduce

Expected behavior: or &k will reset and return text back to normal upon usage of or &r Actual behavior: The entire string of text is obfuscated and only /&r with a character after it will actually reset it. You are not able to use reset and then a color code.

For example, <obf>test<reset><red>test will return obfuscated for all 8 characters, while the behavior expected is that the first four are obfuscated while the other part is just red.

ThisIsALegitUsername commented 1 month ago

The example isn't showing properly so i'll rewrite it in a codeblock

<obf>test<reset><red>test makes all eight characters obfuscated. The expected behavior is that the first 4 characters are obfuscated, while the remaining 4 are test in red text.

kangarko commented 1 month ago

Where exactly are you using this? Provide /chc debug with steps to reproduce. Or is this just in chat?

kangarko commented 1 month ago

In chat, you need to use the end tag </obf> to end formatting explicitly now with minimessage.

ThisIsALegitUsername commented 1 month ago

This is for the prefix before the player, but it happens globally. It happens with the default chatcontrol configuration.

To reproduce it, you can just send &kobf&r&ctest or <obf>test<reset><red>test into chat. Using </obf> seems to work, but if there an equivalent for legacy formatting with &? Many plugin I am using do not support minimessage formatting.

kangarko commented 1 month ago

This is unfortunately the limitation of our parser. You can see the SimpleComponent class in Foundation and make a pull request to improve if, but at this moment an end tag, or &r is required to properly clean up a formatting tag.