Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. ItemStack apple = new ItemStack(Material.APPLE, 5);
  2.  
  3. //apple is the name (you choose the name)
  4.  
  5. PlayerInventory pi = player.getInventory(); //using this it simplifies adding it to the inv.
  6.  
  7. pi.setItem(0,apple);
  8.  
  9. //0 is the slot of the inventory it is in
  10. //apple is the name of the item stack you defined yourself!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement