Module gomint.api

Class CommandOverload


  • public class CommandOverload
    extends Object
    Version:
    1.0
    Author:
    geNAZt
    • Constructor Detail

      • CommandOverload

        public CommandOverload()
    • Method Detail

      • param

        public CommandOverload param​(String name,
                                     ParamValidator validator)
        Add a param to the command. Params are passed to their validators when the command gets executed.
        Parameters:
        name - of the parameter
        validator - which should decide if the parameter is valid
        Returns:
        the command currently build
      • param

        public CommandOverload param​(String name,
                                     ParamValidator validator,
                                     boolean optional)
        Add a param to the command. Params are passed to their validators when the command gets executed.
        Parameters:
        name - of the parameter
        validator - which should decide if the parameter is valid
        optional - true when parameter is optional, false when not
        Returns:
        the command currently build
      • param

        public CommandOverload param​(String name,
                                     ParamValidator validator,
                                     boolean optional,
                                     String postfix)
        Add a param to the command. Params are passed to their validators when the command gets executed.
        Parameters:
        name - of the parameter
        validator - which should decide if the parameter is valid
        optional - true when parameter is optional, false when not
        postfix - value which should be postfixed to the param
        Returns:
        the command currently build
      • sizeOfOptionals

        public int sizeOfOptionals()
        Return the amount of optional parts in this overload
        Returns:
        amount of optionals