Custom item

Discussion in 'Spigot Plugin Help' started by celcius, Jun 14, 2021.

  1. Hi everyone.

    I'm trying to make a custom item that can be given to the winners at the end of an arena, but I want to use that later to exchange them for items, which I will also handle through the plugin. But how do I identify that the object that I give is the same one that I should receive? Some way to tag items.

    Thank you
  2. Can you cite why getLore() is not recommended?
  3. Lores are visible. You can however use a NBT tag for itemstack which is simplier than PeristentDataContainer.
  4. Mainly since lore is displayed, it’s often edited (e.g a plugin that allows users to change their item’s name and lore, or a crappy plugin that sets the item’s entire lore instead of just adding lines).

    And NBT tags and persistent data containers are perfect for this use case