Class CompoundTagArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,net.minecraft.nbt.CompoundTag>
cloud.commandframework.fabric.argument.CompoundTagArgument<C>
- Type Parameters:
C
- the sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<net.minecraft.nbt.CompoundTag>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class CompoundTagArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,net.minecraft.nbt.CompoundTag>
An argument for the string representation of an NBT
CompoundTag
.- Since:
- 1.5.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull CompoundTagArgument.Builder<C>
Create a newCompoundTagArgument.Builder
.static <C> @NonNull CompoundTagArgument<C>
Create a new requiredCompoundTagArgument
.static <C> @NonNull CompoundTagArgument<C>
Create a new optionalCompoundTagArgument
.static <C> @NonNull CompoundTagArgument<C>
Create a new optionalCompoundTagArgument
with the specified default value.Methods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
Method Details
-
builder
Create a newCompoundTagArgument.Builder
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the component- Returns:
- Created builder
- Since:
- 1.5.0
-
of
Create a new requiredCompoundTagArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
Create a new optionalCompoundTagArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
public static <C> @NonNull CompoundTagArgument<C> optional(@NonNull String name, @NonNull net.minecraft.nbt.CompoundTag defaultTag) Create a new optionalCompoundTagArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component namedefaultTag
- Default tag value- Returns:
- Created argument
- Since:
- 1.5.0
-