Package com.minecolonies.core.commands
Class CommandTree
java.lang.Object
com.minecolonies.core.commands.CommandTree
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommandTree(String commandName) Creates new command tree. -
Method Summary
Modifier and TypeMethodDescriptionprotected CommandTreeaddNode(CommandTree tree) Adds new tree as leaf into this tree.protected CommandTreeaddNode(com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> command) Adds new command as leaf into this tree.protected com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack>build()Builds whole tree for dispatcher.
-
Constructor Details
-
CommandTree
Creates new command tree.- Parameters:
commandName- root vertex name
-
-
Method Details
-
addNode
Adds new tree as leaf into this tree.- Parameters:
tree- new tree to add- Returns:
- this
-
addNode
protected CommandTree addNode(com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> command) Adds new command as leaf into this tree.- Parameters:
command- new commnad to add- Returns:
- this
-
build
protected com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build()Builds whole tree for dispatcher.- Returns:
- tree as command node
-