Class ArgumentBoolean

java.lang.Object
io.github.mqzn.commands.arguments.AbstractArgument<Boolean>
io.github.mqzn.commands.arguments.ArgumentBoolean
All Implemented Interfaces:
Argument<Boolean>

public final class ArgumentBoolean extends AbstractArgument<Boolean>
  • Method Details

    • parse

      public <S> Boolean parse(@UnknownNullability S sender, @NotNull @NotNull String command, @NotNull @NotNull String input) throws ArgumentParseException
      Description copied from interface: Argument
      Parses the raw input into it's argument type The argument type must be registered and defined by the user
      Type Parameters:
      S - the sender type
      Parameters:
      sender - the sender of the command
      command - the command
      input - the raw argument
      Returns:
      the parsed object from raw
      Throws:
      ArgumentParseException - when it fails to parse the raw argument
    • suggestions

      @NotNull public @NotNull List<Boolean> suggestions()
      Specified by:
      suggestions in interface Argument<Boolean>
      Overrides:
      suggestions in class AbstractArgument<Boolean>
      Returns:
      the suggestions of this argument
    • alternativeTypes

      public Class<?>[] alternativeTypes()
      Description copied from interface: Argument
      Alternative types that relate to similar data-type of the argument example-> boolean.class refers to Boolean.class
      Returns:
      the alternative data-types of this argument's data-types