Class FrameworkReplies
java.lang.Object
com.ultikits.ultitools.command.engine.FrameworkReplies
Shared framework replies for Paper-retained callbacks and unavailable-literal syntax events.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interfaceprivate static final recordprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BaseCommandExecutorprivate final com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> private final FrameworkReplies.Redispatchprivate final ThreadLocal<Boolean> -
Constructor Summary
ConstructorsConstructorDescriptionFrameworkReplies(BaseCommandExecutor executor, com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> original, FrameworkReplies.Redispatch redispatch) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddFallback(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, com.mojang.brigadier.builder.ArgumentBuilder<io.papermc.paper.command.brigadier.CommandSourceStack, ?> builder) private static FrameworkReplies.Stepargument(com.mojang.brigadier.tree.ArgumentCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack, ?> node, com.mojang.brigadier.StringReader reader, io.papermc.paper.command.brigadier.CommandSourceStack source) private static ArgargumentError(com.mojang.brigadier.Message message) private voidcollectOwnUsage(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, io.papermc.paper.command.brigadier.CommandSourceStack source, Set<String> usages) private voidcollectUsages(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, io.papermc.paper.command.brigadier.CommandSourceStack source, Set<String> usages) private static booleancustomParser(com.mojang.brigadier.tree.ArgumentCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack, ?> node) private com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> decorate(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, boolean root) private <T> com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> decorateArgument(com.mojang.brigadier.tree.ArgumentCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack, T> node, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> body, boolean replyOnly) private intexecute(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> body, boolean replyOnly) private static booleangreedy(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node) private intinvocationFailure(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, com.mojang.brigadier.exceptions.CommandSyntaxException failure) private static com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> literal(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> parent, String token) private booleanneedsRewrite(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context) Ordinary successful argument paths are not parsed again.private static FrameworkReplies.Stepnext(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> parent, com.mojang.brigadier.StringReader reader, io.papermc.paper.command.brigadier.CommandSourceStack source) private intredispatchCanonical(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, FrameworkReplies.Walk walk) private intreply(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context) (package private) intprivate static voidsendArgumentError(org.bukkit.command.CommandSender sender, com.mojang.brigadier.Message message) private voidsendReply(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, FrameworkReplies.Walk walk) private voidsendUsages(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, FrameworkReplies.Walk walk, org.bukkit.command.CommandSender sender) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestFromTree(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) private static Stringtoken(com.mojang.brigadier.StringReader reader) (package private) com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> tree()(package private) booleanunavailableLiteral(String input, io.papermc.paper.command.brigadier.CommandSourceStack source) A syntax failure is ours only when a usable prefix reaches an unavailable literal.private static com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> visibleCopy(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, io.papermc.paper.command.brigadier.CommandSourceStack source) private FrameworkReplies.WalkThe recovery walk uses the compiled tree's argument parsers and preserves quoted/greedy argument contents.
-
Field Details
-
executor
-
original
private final com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> original -
redispatch
-
retrying
-
-
Constructor Details
-
FrameworkReplies
FrameworkReplies(BaseCommandExecutor executor, com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> original, FrameworkReplies.Redispatch redispatch)
-
-
Method Details
-
tree
com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> tree() -
decorate
private com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> decorate(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, boolean root) -
decorateArgument
private <T> com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> decorateArgument(com.mojang.brigadier.tree.ArgumentCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack, T> node, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> body, boolean replyOnly) -
addFallback
private void addFallback(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, com.mojang.brigadier.builder.ArgumentBuilder<io.papermc.paper.command.brigadier.CommandSourceStack, ?> builder) -
execute
private int execute(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> body, boolean replyOnly) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
needsRewrite
private boolean needsRewrite(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context) Ordinary successful argument paths are not parsed again. Only a competing literal or fallback needs a walk. -
suggestFromTree
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestFromTree(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) -
visibleCopy
private static com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> visibleCopy(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node, io.papermc.paper.command.brigadier.CommandSourceStack source) -
greedy
private static boolean greedy(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> node) -
invocationFailure
private int invocationFailure(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, com.mojang.brigadier.exceptions.CommandSyntaxException failure) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
reply
int reply(String input, io.papermc.paper.command.brigadier.CommandSourceStack source) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
reply
private int reply(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
redispatchCanonical
private int redispatchCanonical(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, FrameworkReplies.Walk walk) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
sendReply
private void sendReply(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, FrameworkReplies.Walk walk) -
sendUsages
private void sendUsages(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, FrameworkReplies.Walk walk, org.bukkit.command.CommandSender sender) -
sendArgumentError
private static void sendArgumentError(org.bukkit.command.CommandSender sender, com.mojang.brigadier.Message message) -
argumentError
-
walk
private FrameworkReplies.Walk walk(String input, io.papermc.paper.command.brigadier.CommandSourceStack source) The recovery walk uses the compiled tree's argument parsers and preserves quoted/greedy argument contents. -
next
private static FrameworkReplies.Step next(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> parent, com.mojang.brigadier.StringReader reader, io.papermc.paper.command.brigadier.CommandSourceStack source) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
argument
private static FrameworkReplies.Step argument(com.mojang.brigadier.tree.ArgumentCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack, ?> node, com.mojang.brigadier.StringReader reader, io.papermc.paper.command.brigadier.CommandSourceStack source) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
customParser
private static boolean customParser(com.mojang.brigadier.tree.ArgumentCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack, ?> node) -
token
-
literal
private static com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> literal(com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> parent, String token) -
collectUsages
-
collectOwnUsage
-