Class BlockPosArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Coordinates.BlockCoordinates>
cloud.commandframework.fabric.argument.server.BlockPosArgument<C>
- Type Parameters:
C
- the sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<Coordinates.BlockCoordinates>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class BlockPosArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,Coordinates.BlockCoordinates>
An argument for resolving
Coordinates.BlockCoordinates
.- Since:
- 1.5.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull BlockPosArgument.Builder<C>
Create a newBlockPosArgument.Builder
.static <C> @NonNull BlockPosArgument<C>
Create a new requiredBlockPosArgument
.static <C> @NonNull BlockPosArgument<C>
Create a new optionalBlockPosArgument
.static <C> @NonNull BlockPosArgument<C>
Create a new optionalBlockPosArgument
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 newBlockPosArgument.Builder
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the argument- Returns:
- Created builder
- Since:
- 1.5.0
-
of
Create a new requiredBlockPosArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
Create a new optionalBlockPosArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
public static <C> @NonNull BlockPosArgument<C> optional(@NonNull String name, @NonNull net.minecraft.core.BlockPos defaultValue) Create a new optionalBlockPosArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component namedefaultValue
- default value- Returns:
- Created argument
- Since:
- 1.5.0
-