Some Inventory Help

Discussion in 'Plugin Development' started by vaiquero, Apr 23, 2011.

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

    vaiquero

    Just a quick question, how exactly do you set a player's inventory's armor contents after you have it saved by getArmorContents()?
     
  2. Offline

    alex123099

    you do a for loop, which goes through the ItemStack array, and to each cell you do:
    Code:
    stack[i].setTypeId(id);
    
     
  3. Offline

    vaiquero

    Thank you for the help, but isnt that to change the item type? What I am aiming for is getting the itemstacks from getArmorContents() and equipping them to the player. I can just use setBoots() and setChestplate(), etc, however I dont know how getArmorContents orders the arraylist,
     
  4. Offline

    alex123099

    the array is ordered like this:
    first cell - the first armor item in inventory
    second cell - the second item
    etc.
     
Thread Status:
Not open for further replies.

Share This Page