Class ArgumentNbtTag
java.lang.Object
net.minestom.server.command.builder.arguments.Argument<BinaryTag>
net.minestom.server.command.builder.arguments.minecraft.ArgumentNbtTag
Argument used to retrieve a
BinaryTag based object, can be any kind of tag like
CompoundBinaryTag, ListBinaryTag,
IntBinaryTag, etc...
Example: {display:{Name:"{\"text\":\"Sword of Power\"}"}} or [{display:{Name:"{\"text\":\"Sword of Power\"}"}}]
-
Field Summary
FieldsFields inherited from class Argument
allowSpace, suggestionType, useRemaining -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(CommandSender sender, String input) Parses the given input, and throw anArgumentSyntaxExceptionif the input cannot be converted toTparser()toString()Methods inherited from class 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_NBT
public static final int INVALID_NBT- See Also:
-
-
Constructor Details
-
ArgumentNbtTag
-
-
Method Details
-
parse
Description copied from class:ArgumentParses the given input, and throw anArgumentSyntaxExceptionif the input cannot be converted toT- Specified by:
parsein classArgument<BinaryTag>- Parameters:
input- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException- ifvalueis not valid
-
parser
-
toString
-