Class CommandTreeCompiler
java.lang.Object
com.ultikits.ultitools.command.engine.CommandTreeCompiler
Compiles the annotation model once, never matching strings during normal dispatch.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface(package private) static final recordprivate static final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidadd(CommandTreeCompiler.Spec root, Class<?> owner, Method method, String format) private CommandTreeCompiler.SpecaddPart(CommandTreeCompiler.Spec parent, Class<?> owner, Method method, String format, String[] parts, int index, Map<String, Parameter> parameters, List<String> names) private static voidappendSignature(CommandTreeCompiler.Spec spec, StringBuilder out) private static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<io.papermc.paper.command.brigadier.CommandSourceStack, T> argumentBuilder(String name, com.mojang.brigadier.arguments.ArgumentType<T> type, SuggestionBridge suggestions, List<Method> uses) private com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> build(CommandTreeCompiler.Spec spec, CommandTreeCompiler.Invocation invocation, SuggestionBridge suggestions, Class<?> owner, List<CommandTreeCompiler.Spec> ancestors) private CommandTreeCompiler.Specchild(CommandTreeCompiler.Spec parent, String name, ArgumentMapping argument, Class<?> owner, Method method, String format) (package private) CompiledCommandcompile(BaseCommandExecutor executor, String description, CommandTreeCompiler.Invocation invocation, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> help) (package private) CompiledCommandcompile(BaseCommandExecutor executor, String description, List<String> aliases, String permission, boolean requireOp, CommandTreeCompiler.Invocation invocation, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> help) private static CommandCompilationExceptionprivate static intinvoke(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, Method method, List<CommandTreeCompiler.Spec> path, String empty, CommandTreeCompiler.Invocation invocation) parameters(Method method) private static voidrejectDuplicateFormats(BaseCommandExecutor executor)
-
Field Details
-
nativeTypes
-
-
Constructor Details
-
CommandTreeCompiler
CommandTreeCompiler(NativeArgumentTypes nativeTypes)
-
-
Method Details
-
compile
CompiledCommand compile(BaseCommandExecutor executor, String description, CommandTreeCompiler.Invocation invocation, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> help) -
compile
CompiledCommand compile(BaseCommandExecutor executor, String description, List<String> aliases, String permission, boolean requireOp, CommandTreeCompiler.Invocation invocation, com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack> help) -
rejectDuplicateFormats
-
add
-
addPart
-
child
private CommandTreeCompiler.Spec child(CommandTreeCompiler.Spec parent, String name, ArgumentMapping argument, Class<?> owner, Method method, String format) -
parameters
-
build
private com.mojang.brigadier.tree.CommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> build(CommandTreeCompiler.Spec spec, CommandTreeCompiler.Invocation invocation, SuggestionBridge suggestions, Class<?> owner, List<CommandTreeCompiler.Spec> ancestors) -
methods
-
argumentBuilder
private static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<io.papermc.paper.command.brigadier.CommandSourceStack, T> argumentBuilder(String name, com.mojang.brigadier.arguments.ArgumentType<T> type, SuggestionBridge suggestions, List<Method> uses) -
invoke
private static int invoke(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context, Method method, List<CommandTreeCompiler.Spec> path, String empty, CommandTreeCompiler.Invocation invocation) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
appendSignature
-
invalid
private static CommandCompilationException invalid(Class<?> owner, Method method, String format, String reason)
-