Solved ItemStack ID?

Discussion in 'Spigot Plugin Development' started by Frealy1995, May 19, 2016.

  1. ID LIST :

    Potion Of Regen 2-- 373:8225
    Potion Of Speed 2-- 373:8226

    Code (Text):

            ItemStack itemstack8 = new ItemStack(Material.POTION, 1, (byte) 373);
            ItemMeta itemmeta8 = itemstack8.getItemMeta();
            itemstack8.setItemMeta(itemmeta8);
     
    Please use speed and 373:8226 not work
     
  2. Did you try using the 2nd number? 8226 in replacement of 373
     
    • Like Like x 1
  3. Set to 373 = Regen potion

    8226 set to speed

    Thanks
     
  4. 373 is the ID of the potion. You're already telling the code to use a potion by using Material.POTION, the data needs to be in the 3rd argument, not the ID of the item you want to use.
     
    • Agree Agree x 1
  5. Yes, I noticed thanks.