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

java.lang.IllegalArgumentException: Max cannot be less than min [Programmatic] #379

Closed
Rollczi opened this issue Feb 19, 2024 · 1 comment · Fixed by #380
Closed

java.lang.IllegalArgumentException: Max cannot be less than min [Programmatic] #379

Rollczi opened this issue Feb 19, 2024 · 1 comment · Fixed by #380
Labels
bug Something isn't working

Comments

@Rollczi
Copy link
Owner

Rollczi commented Feb 19, 2024

[18:45:52 ERROR]: java.lang.IllegalArgumentException: Max cannot be less than min
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.range.Range.<init>(Range.java:13)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.range.Range.range(Range.java:53)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.join.JoinArgumentResolver.getTypedRange(JoinArgumentResolver.java:42)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.join.JoinArgumentResolver.getTypedRange(JoinArgumentResolver.java:14)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.argument.parser.TypedParser.getRange(TypedParser.java:26)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.argument.parser.TypedParser.getRange(TypedParser.java:8)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.input.raw.RawInputAnalyzer$Context.<init>(RawInputAnalyzer.java:85)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.input.raw.RawInputAnalyzer.toContext(RawInputAnalyzer.java:43)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.argument.parser.input.RawParseableInput$RawInputMatcher.nextArgument(RawParseableInput.java:45)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.ScheduledRequirementResolver.matchArgument(ScheduledRequirementResolver.java:76)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.ScheduledRequirementResolver.lambda$prepareRequirements$0(ScheduledRequirementResolver.java:48)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.scheduler.SchedulerSameThreadImpl.supplyLater(SchedulerSameThreadImpl.java:16)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.scheduler.Scheduler.supply(Scheduler.java:52)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.ScheduledRequirementResolver.lambda$toScheduled$3(ScheduledRequirementResolver.java:63)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.ScheduledRequirement.runMatch(ScheduledRequirement.java:25)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.CommandExecuteService.match(CommandExecuteService.java:237)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.CommandExecuteService.match(CommandExecuteService.java:209)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.CommandExecuteService.execute(CommandExecuteService.java:152)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.CommandExecuteService.execute0(CommandExecuteService.java:122)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.executor.CommandExecuteService.execute(CommandExecuteService.java:62)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.command.CommandManager$PlatformListener.execute(CommandManager.java:63)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.velocity.VelocityCommand.execute(VelocityCommand.java:55)
[18:45:52 ERROR]: 	at dev.rollczi.litecommands.velocity.VelocityCommand.execute(VelocityCommand.java:20)
        this
            .context("sender", Audience.class)
            .argumentJoin("message");
@Rollczi
Copy link
Owner Author

Rollczi commented Feb 19, 2024

Solution: replace -1 with max int value Integer.MAX_VALUE
image

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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant