Don't add spaces to literal suggestions
This commit is contained in:
@@ -52,7 +52,7 @@ public class LiteralCommandNode<S> extends CommandNode<S> {
|
|||||||
@Override
|
@Override
|
||||||
public CompletableFuture<Collection<String>> listSuggestions(final CommandContext<S> context, final String command) {
|
public CompletableFuture<Collection<String>> listSuggestions(final CommandContext<S> context, final String command) {
|
||||||
if (literal.toLowerCase().startsWith(command.toLowerCase())) {
|
if (literal.toLowerCase().startsWith(command.toLowerCase())) {
|
||||||
return CompletableFuture.completedFuture(Collections.singleton(literal + " "));
|
return CompletableFuture.completedFuture(Collections.singleton(literal));
|
||||||
} else {
|
} else {
|
||||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user