Class SubCommandSyntax<S>

java.lang.Object
io.github.mqzn.commands.base.syntax.CommandSyntax<S>
io.github.mqzn.commands.base.syntax.SubCommandSyntax<S>
All Implemented Interfaces:
TextConvertible<S>

public final class SubCommandSyntax<S> extends CommandSyntax<S>
  • Method Details

    • setParentArguments

      public void setParentArguments(@NotNull @NotNull List<Argument<?>> parentArguments)
    • addChild

      public void addChild(SubCommandSyntax<S> subCommand)
    • addChild

      public void addChild(String subCommand)
    • hasChild

      public boolean hasChild(String name)
    • hasChild

      public boolean hasChild(SubCommandSyntax<S> subCommandSyntax)
    • removeChild

      public void removeChild(SubCommandSyntax<S> subCommandSyntax)
    • removeChild

      public void removeChild(String name)
    • hasChildren

      public boolean hasChildren()
    • isOrphan

      public boolean isOrphan()
    • defaultExecution

      public <C> void defaultExecution(C sender, DelegateCommandContext<S> context)
    • execute

      public <C> void execute(C sender, CommandContext<S> commandContext)
      Overrides:
      execute in class CommandSyntax<S>
    • matches

      public boolean matches(String rawArgument)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      @NotNull public @NotNull String getName()
    • getChildren

      @NotNull public @NotNull LinkedHashSet<String> getChildren()
    • getParent

      @Nullable public @Nullable String getParent()
    • setParent

      public void setParent(@Nullable @Nullable String parentName)
    • getAliases

      @NotNull public @NotNull CommandAliases getAliases()
    • getCachedParentArguments

      @NotNull public @NotNull List<Argument<?>> getCachedParentArguments()
    • toText

      @NotNull public @NotNull net.kyori.adventure.text.TextComponent toText(@NotNull @NotNull CommandManager<?,S> manager, @NotNull S sender)
      Specified by:
      toText in interface TextConvertible<S>
      Overrides:
      toText in class CommandSyntax<S>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class CommandSyntax<S>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class CommandSyntax<S>