EssentialsX

EssentialsX

2M Downloads

RGB color codes are stripped unless sender has certain color permissions

Tisawesomeness opened this issue · 1 comments

commented

Type of bug

Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=198c833ad8eb4a96a162897908bc7932

Error log (if applicable)

No response

Bug description

If a player has the essentials.chat.rgb permission, but not any other color permissions such as essentials.chat.color, the RGB code will be stripped from the message. This seems to be due to expanding color codes into the vanilla §x§r§r§g§g§b§b format, then stripping the color codes the player does not have access to.

image

This screenshot is the result of sending "&#ff0000test" with the following essentials.chat.<suffix> permissions, top to bottom:

  1. rgb
  2. rgb, color
  3. rgb, white
  4. rgb, black
  5. rgb, black, white

Messages 1, 3, and 4 display as "§xtest" in console.

Also happens in latest stable (2.19.6).

Steps to reproduce

  1. Give yourself the essentials.chat.rgb permission, but NOT any other chat color permissions
  2. Type "&#ff0000test"

Expected behaviour

Should display "test" in bright red

Actual behaviour

Displays "test" in white

commented

Confirmed working.