setInventory funtion?

Discussion in 'Plugin Development' started by AintLarry, Jul 3, 2011.

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

    AintLarry

    Hey,
    I need to give a player the inv of an other player
    i try
    p.setInventory(target.getInventory);
    but it does not work

    how can i give a player the inv of an other player?

    Aint
     
  2. Offline

    Haias

    You'll probably have to clear out p's inventory and then just iterate through target's inventory and invoke addItem() on p's inventory based on the information about target's inventory.
     
  3. Offline

    Shamebot

    Try Inventory.getContents() and Inventory.setContents(..).
     
  4. Offline

    AintLarry

    ok thanks

    OK, it works
    thank you very much

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
Thread Status:
Not open for further replies.

Share This Page