Package dev.selena.luacore.utils.items
Class NBTUtils
java.lang.Object
dev.selena.luacore.utils.items.NBTUtils
NBT utility class mainly for serialization and storing custom nbt compounds
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
getNBTContent
(Class<T> cls, String nameSpaceKey, de.tr7zw.changeme.nbtapi.NBTCompound compoundTag) Gets custom NBT datastatic void
storeNBTContent
(de.tr7zw.changeme.nbtapi.NBTCompound compoundTag, Object content, String nameSpaceKey) Stores custom NBT content
-
Constructor Details
-
NBTUtils
public NBTUtils()
-
-
Method Details
-
storeNBTContent
public static void storeNBTContent(de.tr7zw.changeme.nbtapi.NBTCompound compoundTag, Object content, String nameSpaceKey) Stores custom NBT content- Parameters:
compoundTag
- The Compound tag you want to store in, usually use your plugins onecontent
- The value of the data you want to storenameSpaceKey
- where you should get the data from later- See Also:
-
getNBTContent
public static <T> T getNBTContent(Class<T> cls, String nameSpaceKey, de.tr7zw.changeme.nbtapi.NBTCompound compoundTag) Gets custom NBT data- Type Parameters:
T
- The class type- Parameters:
cls
- The class you want to map tonameSpaceKey
- The key you set instoreNBTContent(NBTCompound, Object, String)
compoundTag
- The NBTCompound you are storing the custom NBT in- Returns:
- Fully mapped class
-