Class ColumnPosArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,Coordinates.ColumnCoordinates>
cloud.commandframework.fabric.argument.server.ColumnPosArgument<C>
- Type Parameters:
C
- the sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<Coordinates.ColumnCoordinates>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class ColumnPosArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,Coordinates.ColumnCoordinates>
An argument for resolving
column (xz) coordinates
.- Since:
- 1.5.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull ColumnPosArgument.Builder<C>
Create a newColumnPosArgument.Builder
.static <C> @NonNull ColumnPosArgument<C>
Create a new requiredColumnPosArgument
.static <C> @NonNull ColumnPosArgument<C>
Create a new optionalColumnPosArgument
.static <C> @NonNull ColumnPosArgument<C>
Create a new optionalColumnPosArgument
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 newColumnPosArgument.Builder
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the argument- Returns:
- Created builder
- Since:
- 1.5.0
-
of
Create a new requiredColumnPosArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
Create a new optionalColumnPosArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
public static <C> @NonNull ColumnPosArgument<C> optional(@NonNull String name, @NonNull net.minecraft.core.BlockPos defaultValue) Create a new optionalColumnPosArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component namedefaultValue
- default value, y coordinate will be ignored as it is always 0- Returns:
- Created argument
- Since:
- 1.5.0
-