Legacy Commands do not have player name tab completion
LadyCailinBot opened this issue ยท 2 comments
WORLDEDIT-3151 - Reported by Dark_Arc
If you try and use tab complete for a command which uses the command system it will not allow you to tab complete player names.
Examples are /give Dark_ in CommandBook will not tab complete Dark_Arc, and /rg addmember Dark_ will not complete Dark_Arc in WorldGuard.
Comment by sk89q
I haven't looked, but I think the bug here lies in the code that registers the command with Bukkit, which was recently changed to tell Bukkit that it can tab complete.
That registration code works with both the old and new command managers.
However, the old command manager doesn't do tab completion at all, so the registration code returns an empty list of suggestions. But because it is returning an empty list (as opposed to not declaring itself able to tab complete), Bukkit skips its default completion of player names and uses what it was given... an empty list.
That other bug was because the new command manager does tab complete but always gave an empty list when you were tab completing a parameter. It was fixed by making all parameters return a list of players when tab completing, even if that parameter doesn't even take a player name.