Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultipleArgumentResolver with #363

Closed
MelonHell opened this issue Jan 22, 2024 · 2 comments · Fixed by #365
Closed

MultipleArgumentResolver with #363

MelonHell opened this issue Jan 22, 2024 · 2 comments · Fixed by #365
Labels
bug Something isn't working

Comments

@MelonHell
Copy link

I have an argument with several parts and I want to make the second part optional

For example, I will make such a logger:

override fun suggest(
    invocation: Invocation<CommandSender>,
    argument: Argument<String>,
    context: SuggestionContext,
): SuggestionResult {
    println(context.current.multilevelList())
    return SuggestionResult.empty()
}

If I specify Range(2, 2), then the suggestions will work correctly, but the second argument will not be optional

override fun getRange(argument: Argument<String>): Range {
    return Range(2, 2)
}

image
image

If I specify Range(1, 2), then the suggestions will ignore the second argument

override fun getRange(argument: Argument<String>): Range {
    return Range(1, 2)
}

image
image

@Rollczi
Copy link
Owner

Rollczi commented Jan 23, 2024

GH-365

@Rollczi
Copy link
Owner

Rollczi commented Jan 23, 2024

Thanks for your bug report. It will be fixed in the next 3.3.2 release. ❤️

@Rollczi Rollczi added the bug Something isn't working label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants