- Copy NMSLibrary.jar to plugins folder
- Download here: releases
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.RemVN.NMSLibrary</groupId>
<artifactId>NMSLibrary_API</artifactId>
<version>1.3</version>
<spoce>provided</scope>
</dependency>
- Javadoc: latest
depend: [NMSLibrary]
Adding a String tag to ItemStack
ItemStack item = new ItemStack(Material.DIAMOND_SWORD);
NBT nbt = NMSLibrary.getAPI().getNBT();
nbt.addStringTag(item, "TagName", "TagValue");
Getting a String tag from ItemStack
ItemStack item = new ItemStack(Material.DIAMOND_SWORD);
NBT nbt = NMSLibrary.getAPI().getNBT();
String value = nbt.getStringTag(item, "TagName");