Description
Expected behavior
I have a BasicCommand
which I want to get suggestion for.
@Override
public @NotNull Collection<String> suggest(@NotNull CommandSourceStack stack, @NotNull String[] args) {
if (args.length <= 1) {
return SuggestionHelper.getSchematicSuggestions(this.schematicDirectory, args);
}
return Collections.emptyList();
}
If I've typed in my first argument and then add a space attempting to get the completions for the next argument, I should receive no suggestions since I'm returning an empty list.
Observed/Actual behavior
The player still sees their previous suggestions
Only when a non-whitespace character is added, do the correct suggestions show
Steps/models to reproduce
With the code above (where SuggestionHelper.getSchematicSuggestions(this.schematicDirectory, args);
just returns a list with some strings), type in the first argument and then after inputting a space the suggestions will remain
Plugin and Datapack List
Paper Plugins:
- Faberium <- The test plugin
Bukkit Plugins:
- Builders-Utilities, BuildSystem, FastAsyncWorldEdit
Paper version
This server is running Paper version 1.21-124-master@df3b654 (2024-08-02T00:02:38Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-123-0a1be9a (MC: 1.21)
Other
https://discord.com/channels/289587909051416579/555462289851940864/1269761853723246622
Metadata
Metadata
Assignees
Labels
Type
Projects
Status