Class ResourceLocationArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,net.minecraft.resources.ResourceLocation>
cloud.commandframework.fabric.argument.ResourceLocationArgument<C>
- Type Parameters:
C
- the sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<net.minecraft.resources.ResourceLocation>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class ResourceLocationArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,net.minecraft.resources.ResourceLocation>
An argument parsing a
ResourceLocation
.- Since:
- 1.5.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull ResourceLocationArgument.Builder<C>
Create a newResourceLocationArgument.Builder
.static <C> @NonNull ResourceLocationArgument<C>
Create a new requiredResourceLocationArgument
.static <C> @NonNull ResourceLocationArgument<C>
Create a new optionalResourceLocationArgument
.static <C> @NonNull ResourceLocationArgument<C>
Create a new optionalResourceLocationArgument
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 newResourceLocationArgument.Builder
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the argument- Returns:
- Created builder
- Since:
- 1.5.0
-
of
Create a new requiredResourceLocationArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
Create a new optionalResourceLocationArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
public static <C> @NonNull ResourceLocationArgument<C> optional(@NonNull String name, @NonNull net.minecraft.resources.ResourceLocation defaultValue) Create a new optionalResourceLocationArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument namedefaultValue
- Default value- Returns:
- Created argument
- Since:
- 1.5.0
-