Class AxisArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,EnumSet<net.minecraft.core.Direction.Axis>>
cloud.commandframework.fabric.argument.AxisArgument<C>
- Type Parameters:
C
- the sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<EnumSet<net.minecraft.core.Direction.Axis>>
,Comparable<cloud.commandframework.arguments.CommandArgument<?,
?>>
public final class AxisArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,EnumSet<net.minecraft.core.Direction.Axis>>
An argument for a set of
axes
, described in Vanilla as a "swizzle".- Since:
- 1.5.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull AxisArgument.Builder<C>
Create a newAxisArgument.Builder
.static <C> @NonNull AxisArgument<C>
Create a new requiredAxisArgument
.static <C> @NonNull AxisArgument<C>
Create a new optionalAxisArgument
.static <C> @NonNull AxisArgument<C>
optional
(@NonNull String name, @NonNull Set<@NonNull net.minecraft.core.Direction.Axis> defaultValue) Create a new optionalAxisArgument
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 newAxisArgument.Builder
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Name of the argument- Returns:
- Created builder
- Since:
- 1.5.0
-
of
Create a new requiredAxisArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
Create a new optionalAxisArgument
.- Type Parameters:
C
- Command sender type- Parameters:
name
- Component name- Returns:
- Created argument
- Since:
- 1.5.0
-
optional
public static <C> @NonNull AxisArgument<C> optional(@NonNull String name, @NonNull Set<@NonNull net.minecraft.core.Direction.Axis> defaultValue) Create a new optionalAxisArgument
with the specified default value.- Type Parameters:
C
- Command sender type- Parameters:
name
- Argument namedefaultValue
- Default axes to include- Returns:
- Created argument
- Since:
- 1.5.0
-