ItemStack - Custom Meta Data?

Discussion in 'Spigot Plugin Development' started by SystemUpdate_, Jul 9, 2015.

  1. Hello,

    I was wondering if there was a method for storing meta data or hidden values on item stacks?
  2. sothatsit


    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.
  3. 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.