Adding items to a players enderchest

Discussion in 'Plugin Development' started by 15987632, Jun 9, 2014.

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

    15987632

    ok so im trying to make it so when players mine gold or diamond ore it puts what they should have received in an enderchest i know how to make all of it but how do i put the contents in the specific playes enderchest
     
  2. Offline

    Paul_Luis

    Code:java
    1. player.getEnderChest().setItem();
    2.  
    3. //or
    4.  
    5. player.getEnderChest().addItem();
     
  3. Offline

    15987632

    Paul_Luis ty and one more question will items stack with the .addItem()?
     
  4. Offline

    Gater12

    15987632 likes this.
  5. Offline

    bigteddy98

    You should check if the EnderChest isn't full. If you use addItem() on a full inventory the item gets lost.
     
    15987632 likes this.
  6. Offline

    15987632

    The way I'm doing it this wont be a prob as long as the items stack as Gater12 said
     
Thread Status:
Not open for further replies.

Share This Page