Class ArgumentRelative<T>
java.lang.Object
net.minestom.server.command.builder.arguments.Argument<T>
net.minestom.server.command.builder.arguments.relative.ArgumentRelative<T>
- Type Parameters:
T
- the relative location type
- Direct Known Subclasses:
ArgumentRelativeBlockPosition
,ArgumentRelativeVec
public abstract class ArgumentRelative<T> extends Argument<T>
Common interface for all the relative location arguments.
-
Field Summary
Fields Modifier and Type Field Description static int
INVALID_NUMBER_COUNT_ERROR
static int
INVALID_NUMBER_ERROR
static java.lang.String
RELATIVE_CHAR
Fields inherited from class net.minestom.server.command.builder.arguments.Argument
SUCCESS, UNDEFINED_ERROR
-
Constructor Summary
Constructors Constructor Description ArgumentRelative(java.lang.String id, int numberCount)
-
Method Summary
Modifier and Type Method Description int
getNumberCount()
Gets the amount of numbers that this relative location needs.Methods inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, getCallback, getConditionResult, getCorrectionResult, getId, hasErrorCallback, parse, setCallback, useRemaining
-
Field Details
-
RELATIVE_CHAR
public static final java.lang.String RELATIVE_CHAR- See Also:
- Constant Field Values
-
INVALID_NUMBER_COUNT_ERROR
public static final int INVALID_NUMBER_COUNT_ERROR- See Also:
- Constant Field Values
-
INVALID_NUMBER_ERROR
public static final int INVALID_NUMBER_ERROR- See Also:
- Constant Field Values
-
-
Constructor Details
-
ArgumentRelative
public ArgumentRelative(@NotNull java.lang.String id, int numberCount)
-
-
Method Details
-
getNumberCount
public int getNumberCount()Gets the amount of numbers that this relative location needs.- Returns:
- the amount of coordinate required
-