Class CommandTree

java.lang.Object
com.minecolonies.core.commands.CommandTree

public class CommandTree extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CommandTree(String commandName)
    Creates new command tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected CommandTree
    Adds new tree as leaf into this tree.
    protected CommandTree
    addNode(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>
    Builds whole tree for dispatcher.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CommandTree

      protected CommandTree(String commandName)
      Creates new command tree.
      Parameters:
      commandName - root vertex name
  • Method Details

    • addNode

      protected CommandTree addNode(CommandTree tree)
      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