Class StringArgument.Builder<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,String>
cloud.commandframework.arguments.standard.StringArgument.Builder<C>
- Enclosing class:
- StringArgument<C>
@API(status=STABLE)
public static final class StringArgument.Builder<C>
extends CommandArgument.Builder<C,String>
-
Method Summary
Modifier and TypeMethodDescription@NonNull StringArgument<C>
build()
Builder a new string argument@NonNull StringArgument.Builder<C>
greedy()
Set the string mode to greedy@NonNull StringArgument.Builder<C>
Greedy string that will consume the input until a flag is present.@NonNull StringArgument.Builder<C>
quoted()
Set the string mode to greedy@NonNull StringArgument.Builder<C>
single()
Set the string mode to single@NonNull StringArgument.Builder<C>
withSuggestionsProvider
(@NonNull BiFunction<@NonNull CommandContext<C>, @NonNull String, @NonNull List<@NonNull String>> suggestionsProvider) Set the suggestions providerMethods inherited from class cloud.commandframework.arguments.CommandArgument.Builder
asOptional, asOptionalWithDefault, asRequired, getDefaultDescription, getDefaultValue, getName, getParser, getSuggestionsProvider, getValueType, isRequired, manager, withDefaultDescription, withParser
-
Method Details
-
greedy
Set the string mode to greedy- Returns:
- Builder instance
-
greedyFlagYielding
Greedy string that will consume the input until a flag is present.- Returns:
- Builder instance
- Since:
- 1.7.0
-
single
Set the string mode to single- Returns:
- Builder instance
-
quoted
Set the string mode to greedy- Returns:
- Builder instance
-
withSuggestionsProvider
public @NonNull StringArgument.Builder<C> withSuggestionsProvider(@NonNull BiFunction<@NonNull CommandContext<C>, @NonNull String, @NonNull List<@NonNull String>> suggestionsProvider) Set the suggestions provider- Overrides:
withSuggestionsProvider
in classCommandArgument.Builder<C,
String> - Parameters:
suggestionsProvider
- Suggestions provider- Returns:
- Builder instance
-
build
Builder a new string argument- Overrides:
build
in classCommandArgument.Builder<C,
String> - Returns:
- Constructed argument
-