Class StaticArgument<C>

java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,String>
cloud.commandframework.arguments.StaticArgument<C>
Type Parameters:
C - Command sender type
All Implemented Interfaces:
CloudKeyHolder<String>, Comparable<CommandArgument<?,?>>

public final class StaticArgument<C> extends CommandArgument<C,String>
CommandArgument type that recognizes fixed strings. This type does not parse variables.
  • Method Details

    • of

      public static <C> @NonNull StaticArgument<C> of(@NonNull String name, @NonNull String... aliases)
      Create a new static argument instance for a required command argument
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Argument name
      aliases - Argument aliases
      Returns:
      Constructed argument
    • registerAlias

      public void registerAlias(@NonNull String alias)
      Register a new alias
      Parameters:
      alias - New alias
    • getAliases

      public @NonNull Set<@NonNull String> getAliases()
      Get an immutable view of the aliases
      Returns:
      Immutable view of the argument aliases
    • getAlternativeAliases

      public @NonNull List<@NonNull String> getAlternativeAliases()
      Get an immutable list of all aliases that are not the main literal
      Returns:
      Immutable view of the optional argument aliases