Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by SystemUpdate_, Jul 9, 2015.
I was wondering if there was a method for storing meta data or hidden values on item stacks?
I believe you can do this using NBT data, but that isn't supported by the api and you would have to use nms to implement it.
I think @NathanWolf was doing something with this. What I've been doing was using https://bukkit.org/threads/storing-hidden-data-in-itemstacks-using-colors-persistent-no-nms.319970/ . It is ItemMeta, but doesn't require me to go into NMS. Though agreed in the future an implementation for meta deta on itemstacks would be good.
I was, but I closed the PR. The main issue is making an API that wraps NBT is a heated topic, and I'm honestly not sure it will ever happen.
However, the good news (and the reason that I closed my PR) is that this data is now fully supported by Spigot- it will get serialized when plugins save items, used in item comparisons, not wiped by creative mode, etc. So if you're willing to reach into NMS a little bit to manipulate the data, it's a pretty viable solution for custom items.