Essential Commands

Essential Commands

108k Downloads

Command auto-complete suggests nicknames, but only accepts full usernames

John-Paul-R opened this issue ยท 5 comments

commented
commented

either revert the "enhancement" of suggesting nicknames, or make it toggleable and make it work

commented

incidentally, I assume this is caused by one of nickname_above_head,nicknames_in_player_list being enabled.

commented

In modern day, I believe what is happening here is that the MC client uses the same information it has about player names for the PlayerList for the Brigadier autocomplete. Since EC provides PlayerList names... oboy.

commented

The serverside solution to this is to accept nicknames when parsing the command argument. (since the autocomplete is done clientside, and we do need to replace those name values in the PlayerList)

To do it right, this'll require enforcing that nicknames be unique. Ideally, it would be impossible to create a nickname that has a text value that matches an existing Minecraft username, but we can't do that because it defeats the purpose. Maybe we just check against the players already registered on the server... but there is always the possibility that someone sets their nickname to "Tom", then the real "Tom" joins the server. -- We could namespace both nicknames and realnames with a character that is invalid for MC usernames. That might work. Makes entering names normally more annoying, though.

commented

it's nickname_above_head that's causing the issue