Class ArgumentNbtTag
java.lang.Object
net.minestom.server.command.builder.arguments.Argument<org.jglrxavpok.hephaistos.nbt.NBT>
net.minestom.server.command.builder.arguments.minecraft.ArgumentNbtTag
Argument used to retrieve a
NBT
based object, can be any kind of tag like
NBTCompound
, NBTList
,
NBTInt
, etc...
Example: {display:{Name:"{\"text\":\"Sword of Power\"}"}} or [{display:{Name:"{\"text\":\"Sword of Power\"}"}}]
-
Field Summary
Fields inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, CONTAINER, suggestionType, useRemaining
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull org.jglrxavpok.hephaistos.nbt.NBT
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_NBT
public static final int INVALID_NBT- See Also:
-
-
Constructor Details
-
ArgumentNbtTag
-
-
Method Details
-
parse
@NotNull public @NotNull org.jglrxavpok.hephaistos.nbt.NBT 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<org.jglrxavpok.hephaistos.nbt.NBT>
- Parameters:
input
- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException
- ifvalue
is not valid
-
parser
-
toString
-