EssentialsX

EssentialsX

2M Downloads

Commands using nicknames being routed to another user.

UPSOKen opened this issue ยท 2 comments

commented

Type of bug

Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=4204f55e10c34431b0cd83451beda173

Error log (if applicable)

No response

Bug description

I use the nickname of Ken on my server. My actual username is "lecraeman". I have all the tab completion and command usage setup to respect nicknames in Essentials. It works almost all the time. However, I've run into an issue lately. Two users have gotten on that have broken the system.

One is named "MushuAwakens" and the other "DuckenEnjoyer". Whenever either is on, if anyone uses "/msg Ken" (Or any other essential commands - it routes to one of them, rather than me. I assume this has to do with the fact that "Ken" is in their actual username.

I even tried giving them nicknames that DID NOT contain "ken" and it still happens. Not entirely sure what is causing this, but I keep executing commands on these players that I intend to execute on myself. I can get around this by using my actual username, but because I have essentials commands setup to tab complete nicknames, that makes this a lot harder.

I am guessing this is some sort of breakage with how essentials tries to find an online player, even if you don't enter a fullname.

Steps to reproduce

  1. Run essentials and give short nickname (Like Ken).
  2. Have user get on with that nickname in their name (Doesn't seem to matter about capitalization at all - ex "MushuAwakens".
  3. Do /msg Ken (Or any other essentials command).
  4. Command is executed at the user with the full name, rather than the user with the actual nickname of "ken".

Expected behaviour

Commands should route to the user with the nickname "Ken" if entered exactly.

Actual behaviour

Commands route to a user with the nickname WITHIN their username. Ex, Nickname --> Ken , routes to --> MushuAwakens.

commented

Nicknames take a lower priority than partial player names by design. This could be improved but would need proper config options and sensible weighting of player name matches (or some kind of "ambiguous user" prompt).

For now, I would recommend not using displaynames in tab completion and preferring actual usernames, as it is prone to tab completing nonsense when other plugins interfere with displaynames, and not all commands will even search for players by nickname.

I assumed that might be the case. It would definitely be ideal for some workaround - but not entirely sure how that would be implemented. Just wanted to have it down in case it was not intended behavior, or in case someone else came across the issue. I couldn't find much on it elsewhere.

commented

Nicknames take a lower priority than partial player names by design. This could be improved but would need proper config options and sensible weighting of player name matches (or some kind of "ambiguous user" prompt).

For now, I would recommend not using displaynames in tab completion and preferring actual usernames, as it is prone to tab completing nonsense when other plugins interfere with displaynames, and not all commands will even search for players by nickname.