Class CommandComponent<C>

java.lang.Object
cloud.commandframework.CommandComponent<C>
Type Parameters:
C - Command sender type

@API(status=STABLE, since="1.3.0") public final class CommandComponent<C> extends Object
A single literal or argument component of a command
Since:
1.3.0
  • Method Details

    • getArgument

      public @NonNull CommandArgument<C,?> getArgument()
      Gets the command component argument details
      Returns:
      command component argument details
    • getDescription

      @Deprecated @API(status=DEPRECATED, since="1.4.0") public @NonNull Description getDescription()
      Deprecated.
      for removal since 1.4.0. Use getArgumentDescription() instead.
      Gets the command component description
      Returns:
      command component description
    • getArgumentDescription

      @API(status=STABLE, since="1.4.0") public @NonNull ArgumentDescription getArgumentDescription()
      Gets the command component description
      Returns:
      command component description
      Since:
      1.4.0
    • hashCode

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

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

      public @NonNull String toString()
      Overrides:
      toString in class Object
    • of

      @Deprecated @API(status=DEPRECATED, since="1.4.0") public static <C> @NonNull CommandComponent<C> of(@NonNull CommandArgument<C,?> commandArgument, @NonNull Description commandDescription)
      Deprecated.
      for removal since 1.4.0. Use of(CommandArgument, ArgumentDescription) instead.
      Creates a new CommandComponent with the provided argument and description
      Type Parameters:
      C - Command sender type
      Parameters:
      commandArgument - Command Component Argument
      commandDescription - Command Component Description
      Returns:
      new CommandComponent
    • of

      public static <C> @NonNull CommandComponent<C> of(@NonNull CommandArgument<C,?> commandArgument, @NonNull ArgumentDescription commandDescription)
      Creates a new CommandComponent with the provided argument and description
      Type Parameters:
      C - Command sender type
      Parameters:
      commandArgument - Command Component Argument
      commandDescription - Command Component Description
      Returns:
      new CommandComponent