Class ArgumentRelativeVec2
java.lang.Object
net.minestom.server.command.builder.arguments.Argument<RelativeVec>
net.minestom.server.command.builder.arguments.relative.ArgumentRelativeVec2
Represents a
Vec
with 2 floating numbers (x;z) which can take relative coordinates.
Example: -1.2 ~
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, suggestionType, useRemaining
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the amount of numbers that this relative location needs.@NotNull RelativeVec
parse
(@NotNull CommandSender sender, @NotNull String input) Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
parser()
toString()
Methods inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, equals, filter, getCallback, getDefaultValue, getId, getSuggestionCallback, hasErrorCallback, hashCode, hasSuggestion, isOptional, map, map, nodeProperties, parse, setCallback, setDefaultValue, setDefaultValue, setDefaultValue, setSuggestionCallback, suggestionType, useRemaining
-
Field Details
-
INVALID_NUMBER_COUNT_ERROR
public static final int INVALID_NUMBER_COUNT_ERROR- See Also:
-
INVALID_NUMBER_ERROR
public static final int INVALID_NUMBER_ERROR- See Also:
-
MIXED_TYPE_ERROR
public static final int MIXED_TYPE_ERROR- See Also:
-
-
Constructor Details
-
ArgumentRelativeVec2
-
-
Method Details
-
parser
- Specified by:
parser
in classArgument<RelativeVec>
-
toString
-
parse
@NotNull public @NotNull RelativeVec parse(@NotNull @NotNull CommandSender sender, @NotNull @NotNull String input) throws ArgumentSyntaxException Description copied from class:Argument
Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
- Specified by:
parse
in classArgument<RelativeVec>
- Parameters:
input
- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException
- ifvalue
is not valid
-
getNumberCount
public int getNumberCount()Gets the amount of numbers that this relative location needs.- Returns:
- the amount of coordinate required
-