EssentialsX

EssentialsX

2M Downloads

/nick command improperly handling color/formatting codes

Weasel-Beans opened this issue ยท 1 comments

commented

Type of bug

Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=0758ecb2cb034948af2560f01dbe78b9

Error log (if applicable)

No response

Bug description

Using the /nick command to change names seems to function improperly without essentials.nick.allowunsafe.

This issue also seems to make it so that the feature where players can only set color/formatting codes for their name with essentials.nick.changecolors is completely non-functional.

Steps to reproduce

If you want users to change the color/formatting codes as well as the text of their display name:

  • Apply essentials.nick to a group, and attempt to use the /nick command.
  • Then, add essentials.nick.allowunsafe and try again.

If you only want users to change the color/formatting of their display name, and not the text:

  • Apply essentials.nick and essentials.nick.changecolors to a group, and attempt to use the /nick command.
  • Then, add essentials.nick.allowunsafe and try again.

Expected behaviour

If you want users to change the color/formatting codes as well as the text of their display name:

  • You should be able to freely alter both color/formatting codes as well as the text of a username without allowing 'unsafe' nicknames.

If you only want users to change the color/formatting of their display name, and not the text:

  • Users should be able to do (for example) /nick &1Username and alter their display name by inserting formatting codes, without changing any of the text.

Actual behaviour

If you want users to change the color/formatting codes as well as the text of their display name:

  • With only essentials.nick, users can change the text of their display name, but when attempting to insert any color or formatting codes, they see Error: Nicknames must be alphanumeric.
  • With essentials.nick.allowunsafe added, color/formatting codes will function as intended, however users are now allowed to use 'unsafe' nicknames.

If you only want users to change the color/formatting of their display name, and not the text:

  • With only essentials.nick and essentials.nick.changecolors, users who attempt to put color/formatting codes in their name with the /nick command will see Error: Nicknames must be alphanumeric..
  • With essentials.nick.allowunsafe added, users who attempt to put color/formatting codes in their name with the /nick command will see Error: Nicknames can only have their colors changed.. Therefore this feature is completely non-functional.
commented

You don't need to add essentials.nick.allowunsafe for this to function at all. You need to give the users permissions for actual color codes. (essentials.nick.<color>)

Example: setting essentials.nick, essentials.nick.changecolors and essentials.nick.dark_red to true will allow the player to use /nick &4<Their Exact username here>, and nothing else.
Seems like just a slight misunderstanding of how the color permissions actually work, so for the time being im going to close as this is working as intended. If this does not help, please feel free to reach out on the MOSS Discord for support, and somebody will be able to assist you there.