From e26683846b00124bf36774c4db239588b0eec03f Mon Sep 17 00:00:00 2001 From: efekos <56752400+efekos@users.noreply.github.com> Date: Sat, 6 Jul 2024 16:04:02 +0300 Subject: [PATCH] fix doubling literals --- src/main/java/dev/efekos/arn/Arn.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/dev/efekos/arn/Arn.java b/src/main/java/dev/efekos/arn/Arn.java index 0acd2de..538b544 100644 --- a/src/main/java/dev/efekos/arn/Arn.java +++ b/src/main/java/dev/efekos/arn/Arn.java @@ -276,7 +276,6 @@ private void scanConfigurers(Reflections reflections) { configurerInstance.addHandlerMethodArgumentResolvers(handlerMethodArgumentResolvers); configurerInstance.addArgumentResolvers(commandArgumentResolvers); configurerInstance.putArgumentResolverExceptions(commandArgumentResolverExceptions); - System.out.println("a"); configurerInstance.putHandlerMethodArgumentResolverExceptions(handlerExceptions); } } @@ -439,7 +438,7 @@ private void registerCommands() throws ArnException { } for (CommandAnnotationLiteral lit : literals) - if(lit.getOffset()==nonnullResolvers.size()) nodes.add(Commands.literal(lit.getLiteral())); + if(lit.getOffset()==nonnullResolvers.size()&&lit.getOffset()!=0) nodes.add(Commands.literal(lit.getLiteral())); com.mojang.brigadier.Command lambda = commandContext -> {