Class IntegerArgument<C>

    • Method Detail

      • of

        public static <C> @NonNull CommandArgument<C,​Integerof​(@NonNull String name)
        Create a new required command argument
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Created argument
      • optional

        public static <C> @NonNull CommandArgument<C,​Integeroptional​(@NonNull String name,
                                                                             int defaultNum)
        Create a new required command argument with a default value
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        defaultNum - Default num
        Returns:
        Created argument
      • getMin

        public int getMin()
        Get the minimum accepted integer that could have been parsed
        Returns:
        Minimum integer
      • getMax

        public int getMax()
        Get the maximum accepted integer that could have been parsed
        Returns:
        Maximum integer