#How do I remove tab completion from specific commands?

1 messages · Page 1 of 1 (latest)

narrow pine
#

Returning an empty list at the tab complete method doesnt seem to work (it displays a tiny space where the tab completion should be)

public class TabCompletion implements TabCompleter {
    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {
        if(label.equalsIgnoreCase("afkTitle")){
            if(args.length == 1) return Arrays.asList("title","subtitle");
            else return Collections.singletonList("");
        }
        if(label.equalsIgnoreCase("afk"))
            return Collections.singletonList("");
        if(label.equalsIgnoreCase("afkTime"))
            return Collections.singletonList("");
        return null;
    }
}
terse tartan
#

Collections.emptyList()

ember escarp
#

beatmetoit

narrow pine
#

haha upvote on discord

#

I will try that
thanks!

ember escarp
#

you could also return null

#

if that doesnt work

narrow pine
#

returning null does the default autocompletion (the player list)

terse tartan
#

null sends the player list

#

my tab complete be like brr

ember escarp
#

oh really?

#

good to know

terse tartan
#

yes and its the default too

ember escarp
#

kinda cringe tbh

narrow pine
terse tartan
#

you dont wanna see this lmao

ember escarp
#

ewww

#

im leaving this trhead

narrow pine
#

xD

terse tartan
#

bye

narrow pine
#

why have so many methods?

narrow pine
#

hm i had no idea there is more than one haha