Class NbtPathArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,net.minecraft.commands.arguments.NbtPathArgument.NbtPath>
cloud.commandframework.fabric.argument.NbtPathArgument<C>
- Type Parameters:
C
- the sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<net.minecraft.commands.arguments.NbtPathArgument.NbtPath>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class NbtPathArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,net.minecraft.commands.arguments.NbtPathArgument.NbtPath>
An argument for
NBT paths
to locations within
Tags
.- Since:
- 1.5.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull NbtPathArgument.Builder<C>
Create a newNbtPathArgument.Builder
.static <C> @NonNull NbtPathArgument<C>
Create a new requiredNbtPathArgument
.static <C> @NonNull NbtPathArgument<C>
Create a new optionalNbtPathArgument
.static <C> @NonNull NbtPathArgument<C>
optional
(@NonNull String name, @NonNull net.minecraft.commands.arguments.NbtPathArgument.NbtPath defaultTag) Create a new optionalNbtPathArgument
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 newNbtPathArgument.Builder
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the component- Returns:
- Created builder
- Since:
- 1.5.0
-
of
Create a new requiredNbtPathArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
Create a new optionalNbtPathArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
public static <C> @NonNull NbtPathArgument<C> optional(@NonNull String name, @NonNull net.minecraft.commands.arguments.NbtPathArgument.NbtPath defaultTag) Create a new optionalNbtPathArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component namedefaultTag
- Default tag value- Returns:
- Created component
- Since:
- 1.5.0
-