Class CommandNode
-
- All Implemented Interfaces:
public final class CommandNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCommandNode.Companion
-
Field Summary
Fields Modifier and Type Field Description private List<LiteralArgumentBuilder<CommandSourceStack>>rootsprivate final CommandDispatcher<CommandSourceStack>dispatcherprivate ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>>parentprivate final BooleanisRootprivate final IntegerpermissionLevelpublic final static CommandNode.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description CommandNode(CommandDispatcher<CommandSourceStack> dispatcher, ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>> parent, Boolean isRoot, Integer permissionLevel)
-
Method Summary
Modifier and Type Method Description final List<LiteralArgumentBuilder<CommandSourceStack>>getRoots()final UnitsetRoots(List<LiteralArgumentBuilder<CommandSourceStack>> roots)final CommandDispatcher<CommandSourceStack>getDispatcher()final ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>>getParent()final UnitsetParent(ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>> parent)final BooleanisRoot()final IntegergetPermissionLevel()final Pair<LiteralArgumentBuilder<CommandSourceStack>, ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>>>buildCommand(String cmd, ArgumentType<?> argTypes, Function1<CommandContext<CommandSourceStack>, Integer> executes)final Unitadd(String cmd, ArgumentType<?> argTypes, Function1<CommandContext<CommandSourceStack>, Integer> executes)final CommandNodechild(String cmd, Integer permissionLevel, ArgumentType<?> argTypes)final Unitfinish()-
-
Method Detail
-
getDispatcher
final CommandDispatcher<CommandSourceStack> getDispatcher()
-
getParent
final ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>> getParent()
-
setParent
final Unit setParent(ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>> parent)
-
getPermissionLevel
final Integer getPermissionLevel()
-
buildCommand
final Pair<LiteralArgumentBuilder<CommandSourceStack>, ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>>> buildCommand(String cmd, ArgumentType<?> argTypes, Function1<CommandContext<CommandSourceStack>, Integer> executes)
-
add
final Unit add(String cmd, ArgumentType<?> argTypes, Function1<CommandContext<CommandSourceStack>, Integer> executes)
-
child
final CommandNode child(String cmd, Integer permissionLevel, ArgumentType<?> argTypes)
-
-
-
-