Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ItemStack apple = new ItemStack(Material.APPLE, 5);
- //apple is the name (you choose the name)
- PlayerInventory pi = player.getInventory(); //using this it simplifies adding it to the inv.
- pi.setItem(0,apple);
- //0 is the slot of the inventory it is in
- //apple is the name of the item stack you defined yourself!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement