Solved Loading inventory into an array help

Discussion in 'Plugin Development' started by ItsComits, Jan 5, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    ItsComits

    Hello, Below is a picture of the problem I am having. The diamonds are supposed to be in the armor slots and the wood is supposed to be in the inventory.
    Better to use getContents()
     

    Attached Files:

    Last edited: Jan 6, 2018
  2. The Inventory class has a method called getContents () and that you can store in an array

    Inventory inv = p.getInventory ();
    ItemStack [] invArray = inv.getContents ();
     
  3. Offline

    ItsComits

    Fixed
     
    Last edited: Jan 6, 2018
Thread Status:
Not open for further replies.

Share This Page