NBT - Losing NBT Tags after dropping itemstack

Discussion in 'Spigot Plugin Development' started by WiseHollow, Sep 15, 2017.

  1. In my plugin, I am creating an itemstack, converting it into an NMS-Copy, and then writing NBT Tags to it. When I use World#DropItem and drop a Bukkit-Copy of the NMS-ItemStack, the item only keeps the NBT data concerning its Custom Name and Lore. The problem is, the tags "custom data" about different players gets lost it seems.

    After I pickup the item, the plugin claims the ItemStack has no tags on it (nmsStack.hasTag() returns false).

    Is this because the data I stored isn't pertaining to any data from built-in NMS data? If so, how can I store any information that i want without losing it?
     
  2. BananaPuncher714

    Supporter

    What about getting the dropped item and setting the itemstack?
     
  3. Really good thought, but sadly it didn't work.