> For the complete documentation index, see [llms.txt](https://plugins-1.gitbook.io/plugins/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugins-1.gitbook.io/plugins/apis/lib/items/nbt-tags.md).

# NBT Tags

So, you've created a custom itemstack with NBT using our builder and now want to check this data on interaction? Simply do the below\..

```java
    @EventHandler
    public void onInteract(PlayerInteractEvent e) {
        ItemStack item = e.getItem();
        String swordType = ItemUtil.getNBTString(item, "sword-type");

        if (swordType != null && swordType.equalsIgnoreCase("strong"))
            e.getPlayer().sendMessage("You clicked the strong sword.");
    }
```

I cannot stress enough how easy this library has made plugin development.
