Class ParameterArray<S extends Source,E>

All Implemented Interfaces:
ParameterType<S,E[]>

public abstract class ParameterArray<S extends Source,E> extends BaseParameterType<S,E[]>
  • Constructor Details

  • Method Details

    • resolve

      public E @Nullable [] resolve(@NotNull @NotNull ExecutionContext<S> context, @NotNull @NotNull CommandInputStream<S> stream, @NotNull @NotNull String input) throws ImperatException
      Description copied from interface: ParameterType
      Resolves the parameter value from the given input string, using the provided execution context and input stream.
      Parameters:
      context - the execution context.
      stream - the command input stream.
      input - the raw input string.
      Returns:
      the resolved value, or null if resolution fails.
      Throws:
      ImperatException - if resolution fails due to an error.
    • isGreedy

      public boolean isGreedy(CommandParameter<S> parameter)
      Description copied from interface: ParameterType
      Determines if this parameter type is greedy, meaning it consumes multiple arguments. By default, returns false.
      Parameters:
      parameter - the command parameter.
      Returns:
      true if greedy, false otherwise.