Finish single argument for command server tab completion.

This commit is contained in:
md_5 2014-12-22 20:14:20 +11:00
parent 2ab0715226
commit bc6d7719a7

View File

@ -78,7 +78,7 @@ public class CommandServer extends Command implements TabExecutor
@Override @Override
public Iterable<String> onTabComplete(final CommandSender sender, final String[] args) public Iterable<String> onTabComplete(final CommandSender sender, final String[] args)
{ {
return ( args.length != 0 ) ? Collections.EMPTY_LIST : Iterables.transform( Iterables.filter( ProxyServer.getInstance().getServers().values(), new Predicate<ServerInfo>() return ( args.length > 1 ) ? Collections.EMPTY_LIST : Iterables.transform( Iterables.filter( ProxyServer.getInstance().getServers().values(), new Predicate<ServerInfo>()
{ {
private final String lower = args[0].toLowerCase(); private final String lower = args[0].toLowerCase();