From ee27fea27621078e48bc539546cb3be253c055a3 Mon Sep 17 00:00:00 2001 From: efekos <56752400+efekos@users.noreply.github.com> Date: Sat, 6 Jul 2024 14:56:29 +0300 Subject: [PATCH] fix literals after an argument not being added therefore breaking the command --- src/main/java/dev/efekos/arn/Arn.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/dev/efekos/arn/Arn.java b/src/main/java/dev/efekos/arn/Arn.java index 92294c5..0acd2de 100644 --- a/src/main/java/dev/efekos/arn/Arn.java +++ b/src/main/java/dev/efekos/arn/Arn.java @@ -438,6 +438,9 @@ private void registerCommands() throws ArnException { if (builder != null) nodes.add(builder); } + for (CommandAnnotationLiteral lit : literals) + if(lit.getOffset()==nonnullResolvers.size()) nodes.add(Commands.literal(lit.getLiteral())); + com.mojang.brigadier.Command lambda = commandContext -> { CommandSender sender = commandContext.getSource().getBukkitSender();