Skip to content

Conversation

@0utplay
Copy link
Contributor

@0utplay 0utplay commented Jan 6, 2022

This PR registers the new java.time.Duration argument parser to the default registry.

Without this registration the parser is not usable for annotation based commands.

See:

 Caused by: java.lang.IllegalArgumentException: Parameter 'arg4' in method 'addUserPermission' has parser 'java.time.Duration' but no parser exists for that type
[06.01 12:27:23.074] SCHWERWIEGEND:     at cloud.commandframework.annotations.AnnotationParser.lambda$buildArgument$6(AnnotationParser.java:590)
[06.01 12:27:23.074] SCHWERWIEGEND:     at java.base/java.util.Optional.orElseThrow(Optional.java:403)
[06.01 12:27:23.074] SCHWERWIEGEND:     at cloud.commandframework.annotations.AnnotationParser.buildArgument(AnnotationParser.java:589)
[06.01 12:27:23.074] SCHWERWIEGEND:     at cloud.commandframework.annotations.AnnotationParser.construct(AnnotationParser.java:441)
[06.01 12:27:23.074] SCHWERWIEGEND:     at cloud.commandframework.annotations.AnnotationParser.parse(AnnotationParser.java:309)
[06.01 12:27:23.074] SCHWERWIEGEND:     at eu.cloudnetservice.cloudnet.node.command.defaults.DefaultCommandProvider.register(DefaultCommandProvider.java:141)
[06.01 12:27:23.074] SCHWERWIEGEND:     at eu.cloudnetservice.cloudnet.node.command.defaults.DefaultCommandProvider.registerDefaultCommands(DefaultCommandProvider.java:208)
[06.01 12:27:23.074] SCHWERWIEGEND:     at eu.cloudnetservice.cloudnet.node.CloudNet.start(CloudNet.java:298)
[06.01 12:27:23.074] SCHWERWIEGEND:     at eu.cloudnetservice.cloudnet.node.BootLogic.main(BootLogic.java:51)
[06.01 12:27:23.074] SCHWERWIEGEND:     ... 13 more

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

Labels

bug Something isn't working parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants