Class RegistryEntryArgument.Builder<C,V>
java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,T>
cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,V,RegistryEntryArgument.Builder<C,V>>
cloud.commandframework.fabric.argument.RegistryEntryArgument.Builder<C,V>
- Type Parameters:
C
- The sender typeV
- The registry value type
- Enclosing class:
- RegistryEntryArgument<C,
V>
public static final class RegistryEntryArgument.Builder<C,V>
extends cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,V,RegistryEntryArgument.Builder<C,V>>
A builder for
RegistryEntryArgument
.- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescription@NonNull RegistryEntryArgument.Builder<C,
V> asOptionalWithDefault
(@NonNull net.minecraft.resources.ResourceKey<V> defaultValue) Sets the command argument to be optional, with the specified default value.@NonNull RegistryEntryArgument<@NonNull C,
@NonNull V> build()
Methods inherited from class cloud.commandframework.arguments.CommandArgument.TypedBuilder
asOptional, asOptionalWithDefault, asRequired, manager, self, withParser, withSuggestionsProvider
Methods inherited from class cloud.commandframework.arguments.CommandArgument.Builder
getDefaultDescription, getDefaultValue, getName, getParser, getSuggestionsProvider, getValueType, isRequired, withDefaultDescription
-
Method Details
-
build
-
asOptionalWithDefault
public @NonNull RegistryEntryArgument.Builder<C,V> asOptionalWithDefault(@NonNull net.minecraft.resources.ResourceKey<V> defaultValue) Sets the command argument to be optional, with the specified default value.- Parameters:
defaultValue
- default value- Returns:
- this builder
- Since:
- 1.5.0
- See Also:
-
CommandArgument.Builder.asOptionalWithDefault(String)
-