aikar / commands

Java Command Dispatch Framework - (Bukkit, Spigot, Paper, Sponge, Bungee, JDA, Velocity supported, generically usable anywhere)
https://acfspigot.emc.gs
MIT License
552 stars 144 forks source link

Empty completion on BungeeCord #243

Open Proximyst opened 4 years ago

Proximyst commented 4 years ago

When using acf-bungee, on completion it suggests an empty argument when there are nothing but subcommands available; it includes all subcommands (as expected), but drops an empty string at the top.

https://uwu.whats-th.is/6QLLsJ6.png

For commands which are simply the root command and have completions set up with @Default, it works just fine:

https://proletariat-dictatorship.is-serious.business/8dRMfaz.png

MrIvanPlays commented 4 years ago

It has to do something with the @empty completion as I've seen weird behaviour of it at bungee.

EDIT: The problem is being this line of code. Unlike Bukkit, BungeeCord doesn't check for empty strings and so adds all completions no matter what they are.

MrIvanPlays commented 4 years ago

Instead of modifying ACF, I will make a PR in BungeeCord to prevent empty completions.