Class CommandNode
-
- All Implemented Interfaces:
public final class CommandNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
CommandNode.Companion
-
Field Summary
Fields Modifier and Type Field Description private List<LiteralArgumentBuilder<CommandSourceStack>>
roots
private final CommandDispatcher<CommandSourceStack>
dispatcher
private ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>>
parent
private final Boolean
isRoot
private final Integer
permissionLevel
public final static CommandNode.Companion
Companion
-
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 Unit
setRoots(List<LiteralArgumentBuilder<CommandSourceStack>> roots)
final CommandDispatcher<CommandSourceStack>
getDispatcher()
final ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>>
getParent()
final Unit
setParent(ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>> parent)
final Boolean
isRoot()
final Integer
getPermissionLevel()
final Pair<LiteralArgumentBuilder<CommandSourceStack>, ArgumentBuilder<CommandSourceStack, out ArgumentBuilder<CommandSourceStack, ?>>>
buildCommand(String cmd, ArgumentType<?> argTypes, Function1<CommandContext<CommandSourceStack>, Integer> executes)
final Unit
add(String cmd, ArgumentType<?> argTypes, Function1<CommandContext<CommandSourceStack>, Integer> executes)
final CommandNode
child(String cmd, Integer permissionLevel, ArgumentType<?> argTypes)
final Unit
finish()
-
-
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)
-
-
-
-