Potion ItemStack

Discussion in 'Spigot Plugin Development' started by RyuZockt, May 14, 2017.

  1. I just saw that creation and potion with itemstack have changed..

    i always use this code


    but it dont work anymore :/

    Code (Text):
    ItemStack potion = new ItemStack(Material.POTION, 1, (short) 8197);
    ItemMeta potionM = potion.getItemMeta();
    potionM.setDisplayName("ยง6Heiltrank");
    potionM.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
    potion.setItemMeta(HeilungM);

    Someone know how to create a potion now?
     
  2. WAS

    WAS

  3. Code (Text):

    ItemStack potion = new ItemStack(Material.POTION);
    PotionMeta pm = (PotionMeta) potion.getItemMeta();

    pm.setBasePotionData(new PotionData(PotionType.AWKWARD));

    potion.setItemMeta(pm);
     
    • Winner Winner x 1