java.lang.Object
org.geysermc.mcprotocollib.protocol.data.game.command.CommandNode

public class CommandNode extends Object
  • Constructor Details

    • CommandNode

      public CommandNode(CommandType type, boolean executable, boolean allowsRestricted, int[] childIndices, OptionalInt redirectIndex, @Nullable String name, @Nullable CommandParser parser, @Nullable CommandProperties properties, @Nullable net.kyori.adventure.key.Key suggestionType)
  • Method Details

    • getType

      public CommandType getType()
      Type of command.
    • isExecutable

      public boolean isExecutable()
      Whether the node is executable.
    • isAllowsRestricted

      public boolean isAllowsRestricted()
      Whether restricted commands are allowed.
    • getChildIndices

      public int[] getChildIndices()
      Child node indices.
    • getRedirectIndex

      public OptionalInt getRedirectIndex()
      Redirect index, or empty if none is set.
    • getName

      public @Nullable String getName()
      Name of the node, if type is LITERAL or ARGUMENT.
    • getParser

      public @Nullable CommandParser getParser()
      Node parser, if type is ARGUMENT.
    • getProperties

      public @Nullable CommandProperties getProperties()
      Command properties, if type is ARGUMENT and the parser has properties.
    • getSuggestionType

      public @Nullable net.kyori.adventure.key.Key getSuggestionType()
      Suggestions type, if present. See SuggestionType for vanilla defaults.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object