Package com.sk89q.worldedit.util.nbt
Class NbtUtils
java.lang.Object
com.sk89q.worldedit.util.nbt.NbtUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends com.sk89q.worldedit.util.nbt.BinaryTag>
TgetChildTag(com.sk89q.worldedit.util.nbt.CompoundBinaryTag tag, String key, com.sk89q.worldedit.util.nbt.BinaryTagType<T> expected)
Get child tag of a NBT structure.
-
Constructor Details
-
NbtUtils
public NbtUtils()
-
-
Method Details
-
getChildTag
public static <T extends com.sk89q.worldedit.util.nbt.BinaryTag> T getChildTag(com.sk89q.worldedit.util.nbt.CompoundBinaryTag tag, String key, com.sk89q.worldedit.util.nbt.BinaryTagType<T> expected) throws InvalidFormatExceptionGet child tag of a NBT structure.- Parameters:
tag
- the tag to read fromkey
- the key to look forexpected
- the expected NBT class type- Returns:
- child tag
- Throws:
InvalidFormatException
- if the format of the items is invalid
-