Getting all the Items in a players Inventory?

Discussion in 'Plugin Development' started by xxCoderForLifexx, Jan 18, 2013.

Thread Status:
Not open for further replies.
  1. How would I do this?
     
  2. Offline

    Woobie

    Code:
    for (int i =0; i<=35;i++)
    {
        player.getInventory().getItem(i);
    }
    Might not work, just modified some code from one of my classes.
     
  3. Offline

    ImTheFool

    Important to note this wouldn't get the items in the armor slots, just in case you need those, too.
     
  4. No I just needed the items in the inventory :D
     
  5. Offline

    skore87

     
    Phinary likes this.
  6. Offline

    YoFuzzy3

    Code:java
    1. player.getInventory().getContents() // inventory contents
    2. player.getInventory().getArmorContents() // armour contents
     
Thread Status:
Not open for further replies.

Share This Page