serialize inventory including itemmeta/lores?

Discussion in 'Spigot Plugin Development' started by Bennnn, May 21, 2015.

  1. How do i serialize inventories including itemmeta and lores? i have tried various resources so far but they didn't work out
  2. It only saves 1 of the itemstacks in my inventory

    Code (Text):
        for(ItemStack i: player.getInventory().getContents()) {
                        shop.set("Contents", i);
  3. Okay, i got that concept working out.

    Let's say i had this string:
    Code (Text):
    ItemStack{IRON_AXE x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, display-name=Iron , repair-cost=2}}
    How do i convert that to its respective itemstack?