Solved Give a player a certain wood plank

Discussion in 'Plugin Development' started by Scullyking, Apr 11, 2015.

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

    Scullyking

    This is proving to be more difficult than I expected. How can I do this? I've done some searching but the solutions seem to be doing not quite what I want, and use deprecated methods.

    Thanks
    Scully
     
  2. @Scullyking Create an itemstack, then just use #getInventory().addItem(ItemStack);
     
  3. Offline

    stormneo7

    Code:
        /**
             * Oak = 0
             * Spruce = 1
             * Birch = 2
             * Jungle = 3
             * Acacia = 4
             * Dark Oak = 5
             */
            // This example is using OAK
            int amount = 52;
            byte plankType = 1;
            ItemStack item = new ItemStack(Material.WOOD, amount, plankType);
     
  4. Offline

    Scullyking

Thread Status:
Not open for further replies.

Share This Page