Class Command.Option

  • Enclosing class:
    Command

    public static class Command.Option
    extends Object
    An Option for a command.
    • Method Detail

      • getName

        @Nonnull
        public String getName()
        The name of this option, subcommand, or subcommand group.
        Returns:
        The name
      • getDescription

        @Nonnull
        public String getDescription()
        The description of this option, subcommand, or subcommand group.
        Returns:
        The description
      • getTypeRaw

        public int getTypeRaw()
        The raw option type.
        Returns:
        The type
      • isRequired

        public boolean isRequired()
        Whether this option is required
        Returns:
        True if this option is required
      • getMinValue

        @Nullable
        public Number getMinValue()
        The minimum value which can be provided for this option.
        This returns null if the value is not set or if the option is not of type INTEGER or NUMBER.
        Returns:
        The minimum value for this option or null
      • getMaxValue

        @Nullable
        public Number getMaxValue()
        The maximum value which can be provided for this option.
        This returns null if the value is not set or if the option is not of type INTEGER or NUMBER.
        Returns:
        The maximum value for this option or null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object