BasicCommand
won't add an empty string to args
when there's a trailing whitespace
#11211
Labels
status: accepted
Disputed bug is accepted as valid or Feature accepted as desired to be added.
type: bug
Something doesn't work as it was intended to.
version: 1.21
Game version 1.21
Expected behavior
I have a
BasicCommand
which I want to get suggestion for.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 remainPlugin and Datapack List
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
The text was updated successfully, but these errors were encountered: