Skip to content

Conversation

@senseiwells
Copy link

This fixes MC-278771.

The overview of this issue is that CommandDispatcher#getCompletionSuggestions doesn't provide the correct CommandContext to the CommandNode for which it's listing suggestions from. This is an issue as some suggestions may be contextual and rely on previous arguments in the command tree. Currently the root CommandContext is provided, this means that any redirect causes the incorrect context to be provided and thus an IllegalStateException to be thrown as the argument cannot be found.

The solution to this is to provide the correct CommandContextBuilder in the CommandContextBuilder#findSuggestionContext method. This builder can then provide the correct CommandContext for the respective command node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant