Class NbtTagArgument.Builder<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,T>
cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,net.minecraft.nbt.Tag,NbtTagArgument.Builder<C>>
cloud.commandframework.fabric.argument.NbtTagArgument.Builder<C>
- Type Parameters:
C
- sender type
- Enclosing class:
- NbtTagArgument<C>
public static final class NbtTagArgument.Builder<C>
extends cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,net.minecraft.nbt.Tag,NbtTagArgument.Builder<C>>
Builder for
NbtTagArgument
.- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescription@NonNull NbtTagArgument.Builder<C>
asOptionalWithDefault
(@NonNull net.minecraft.nbt.Tag defaultValue) Sets the command argument to be optional, with the specified default value.@NonNull NbtTagArgument<C>
build()
Build a newNbtTagArgument
.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
Build a newNbtTagArgument
.- Overrides:
build
in classcloud.commandframework.arguments.CommandArgument.Builder<C,
net.minecraft.nbt.Tag> - Returns:
- Constructed component
- Since:
- 1.5.0
-
asOptionalWithDefault
public @NonNull NbtTagArgument.Builder<C> asOptionalWithDefault(@NonNull net.minecraft.nbt.Tag 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)
-