Don't add spaces to literal suggestions

This commit is contained in:
Nathan Adams 2017-11-16 14:28:11 +01:00
parent 1f201022dd
commit 1b32233044

View file

@ -52,7 +52,7 @@ public class LiteralCommandNode<S> extends CommandNode<S> {
@Override
public CompletableFuture<Collection<String>> listSuggestions(final CommandContext<S> context, final String command) {
if (literal.toLowerCase().startsWith(command.toLowerCase())) {
return CompletableFuture.completedFuture(Collections.singleton(literal + " "));
return CompletableFuture.completedFuture(Collections.singleton(literal));
} else {
return CompletableFuture.completedFuture(Collections.emptyList());
}