ChatControl-Red icon indicating copy to clipboard operation
ChatControl-Red copied to clipboard

Wontfix: Plugin removes formatting from items in anvil

Open froquefy opened this issue 11 months ago • 5 comments

Are you using MySQL?

No

Are you using a proxy?

Yes - Velocity

"/version ChatControlRed" - plugin version

11.1.9

Optional: Error log

No response

ZIP of "/chc debug"

debug.zip

Steps to reproduce

Basically it happens without doing/configuring anything. I have clean Purpur 1.21.1 server with only ChatControl (default settings) installed and formatting from items while for example enchanting in anvil are getting stripped

Image

Image

Image

Image

froquefy avatar Feb 01 '25 23:02 froquefy

ps: idk if I've chosen "Are you using a proxy?" correctly, yea I use velocity on my server, but no I don't use velocitycontrol if that was a question

froquefy avatar Feb 01 '25 23:02 froquefy

I have looked thru your debug file and noticed this setting is empty

Colors:
  
  # Where should we let players to use & or MiniMessage tags?
  # Available: anvil, book, chat, me, say, sign, prefix, nick, suffix, private_message
  Apply_On: []

plase add "anvil" into this

TheIntolerant avatar Feb 02 '25 11:02 TheIntolerant

Known "feature", this behavior is due to rules not being effective with colors applied, so we remove them unless you have chatcontrol.color.use.anvil permission while Colors.Apply_On contains [anvil]

Leaving opened, and since we're open source now, contributions to change this behavior are welcome.

kangarko avatar Feb 03 '25 17:02 kangarko

hmm I see, but if it's because of the rules, why removing "anvil" from Rules.Apply_On doesn't bring back vanilla anvil behavior tho?

froquefy avatar Feb 03 '25 19:02 froquefy

Because renaming items is still filtered by Rules. If we would not remove colors, players without color permission could use them to bypass rules easily.

kangarko avatar Feb 03 '25 19:02 kangarko

Just want to note that this wasn't an issue on ChatControlRed v10.28.6 Do you still have the source code for v10 @kangarko?

I lack the experience to properly fix this, but will help where possible

TheIntolerant avatar Apr 06 '25 12:04 TheIntolerant

I do but it's not gonna work as the system there was completely different.

kangarko avatar Apr 10 '25 15:04 kangarko

I was playing around with this and even after disabling rules for anvils etc

The colours continue to get stripped effectively meaning this behaviour cannot be disabled.

TheIntolerant avatar Apr 20 '25 11:04 TheIntolerant

The issue here is that we now parse minimessage tags, whereas on chatcontrol 10 we would not do any color parsing and thus only keep existing colors (or remove them if rules were configured such)

kangarko avatar Apr 23 '25 17:04 kangarko

This should work as a temporary fix: https://github.com/kangarko/ChatControl/commit/196ca9142b91260da6b41ab1b89683574bc9e69e

kangarko avatar Apr 23 '25 18:04 kangarko