Class StringArgument<C>

  • All Implemented Interfaces:
    java.lang.Comparable<CommandArgument<?,​?>>

    public final class StringArgument<C>
    extends CommandArgument<C,​java.lang.String>
    • Method Detail

      • newBuilder

        public static <C> @NonNull StringArgument.Builder<C> newBuilder​(@NonNull java.lang.String name)
        Create a new builder
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Name of the argument
        Returns:
        Created builder
      • of

        public static <C> @NonNull CommandArgument<C,​java.lang.String> of​(@NonNull java.lang.String name)
        Create a new required single string command argument
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Created argument
      • of

        public static <C> @NonNull CommandArgument<C,​java.lang.String> of​(@NonNull java.lang.String name,
                                                                                @NonNull StringArgument.StringMode stringMode)
        Create a new required command argument
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        stringMode - String mode
        Returns:
        Created argument
      • optional

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

        public static <C> @NonNull CommandArgument<C,​java.lang.String> optional​(@NonNull java.lang.String name,
                                                                                      @NonNull StringArgument.StringMode stringMode)
        Create a new optional command argument
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        stringMode - String mode
        Returns:
        Created argument
      • optional

        public static <C> @NonNull CommandArgument<C,​java.lang.String> optional​(@NonNull java.lang.String name,
                                                                                      @NonNull java.lang.String defaultString)
        Create a new required command argument with a default value
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        defaultString - Default string
        Returns:
        Created argument
      • single

        public static <C> @NonNull CommandArgument<C,​java.lang.String> single​(@NonNull java.lang.String name)
        Create a new required command argument with the 'single' parsing mode
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Created argument
      • greedy

        public static <C> @NonNull CommandArgument<C,​java.lang.String> greedy​(@NonNull java.lang.String name)
        Create a new required command argument with the 'greedy' parsing mode
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Created argument
      • quoted

        public static <C> @NonNull CommandArgument<C,​java.lang.String> quoted​(@NonNull java.lang.String name)
        Create a new required command argument with the 'quoted' parsing mode
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Argument name
        Returns:
        Created argument