Class ByteArgument.Builder<C>

java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,Byte>
cloud.commandframework.arguments.standard.ByteArgument.Builder<C>
Enclosing class:
ByteArgument<C>

@API(status=STABLE) public static final class ByteArgument.Builder<C> extends CommandArgument.Builder<C,Byte>
  • Method Details

    • withMin

      public @NonNull ByteArgument.Builder<C> withMin(byte min)
      Set a minimum value
      Parameters:
      min - Minimum value
      Returns:
      Builder instance
    • withMax

      public @NonNull ByteArgument.Builder<C> withMax(byte max)
      Set a maximum value
      Parameters:
      max - Maximum value
      Returns:
      Builder instance
    • asOptionalWithDefault

      @API(status=STABLE, since="1.5.0") public @NonNull ByteArgument.Builder<C> asOptionalWithDefault(byte defaultValue)
      Sets the command argument to be optional, with the specified default value.
      Parameters:
      defaultValue - default value
      Returns:
      this builder
      Since:
      1.5.0
      See Also:
    • build

      public @NonNull ByteArgument<C> build()
      Builder a new byte argument
      Overrides:
      build in class CommandArgument.Builder<C,Byte>
      Returns:
      Constructed argument