Class Craft.Command.Node

java.lang.Object
me.croabeast.common.reflect.Craft.Command.Node
Enclosing class:
Craft.Command

public static class Craft.Command.Node extends Object
Represents a node in the command tree.

Provides methods to retrieve child nodes, obtain the command name, add new child nodes, and remove commands.

  • Constructor Details

    • Node

      public Node()
  • Method Details

    • getChildren

      public Collection<?> getChildren()
      Retrieves the collection of child nodes of this command node.
      Returns:
      a Collection of child nodes
    • getName

      public String getName()
      Retrieves the name of this command node.
      Returns:
      the command node's name as a String
    • addChild

      public void addChild(Object node)
      Adds a child node to this command node.
      Parameters:
      node - the child node to add
    • removeCommand

      public void removeCommand(String name)
      Removes a command from this node by its name.
      Parameters:
      name - the name of the command to remove