Class AmbiguousNodeException

All Implemented Interfaces:
Serializable

public final class AmbiguousNodeException extends IllegalStateException
Exception thrown when a CommandContext is being inserted into a CommandTree and an ambiguity is detected.
See Also:
Serialized Form
  • Constructor Details

    • AmbiguousNodeException

      public AmbiguousNodeException(@Nullable CommandArgument<?,​?> parentNode, @NonNull CommandArgument<?,​?> ambiguousNode, @NonNull List<@NonNull CommandArgument<?,​?>> children)
      Construct a new ambiguous node exception
      Parameters:
      parentNode - Parent node
      ambiguousNode - Node that caused exception
      children - All children of the parent
  • Method Details

    • getParentNode

      public @Nullable CommandArgument<?,​?> getParentNode()
      Get the parent node
      Returns:
      Parent node
    • getAmbiguousNode

      public @NonNull CommandArgument<?,​?> getAmbiguousNode()
      Get the ambiguous node
      Returns:
      Ambiguous node
    • getChildren

      public @NonNull List<@NonNull CommandArgument<?,​?>> getChildren()
      Get all children of the parent
      Returns:
      Child nodes
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable