Class CommandArguments<T>

java.lang.Object
redempt.ordinate.builder.CommandArguments<T>
Type Parameters:
T - The sender type

public class CommandArguments<T> extends Object
Represents the parsed arguments for a single command execution
  • Constructor Details

  • Method Details

    • sender

      public T sender()
      Returns:
      The sender of the command
    • get

      public <V> V get(String argName)
      Gets an argument by name
      Type Parameters:
      V - The argument's type
      Parameters:
      argName - The name of the argument
      Returns:
      The value of the argument
      Throws:
      IllegalArgumentException - If the given argument name is not found
    • get

      public <V> V get(int index)
      Gets an argument by index. Recommended to use get(String) for clarity.
      Parameters:
      index - The index of the argument