Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3467

Potion changes to uncraftabe potion, if I change it's attributes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • None

      Hello, I have found this problem with potions:

      When I create a potion usingĀ 

      new ItemStack(Material.Potion, 1, data_value);

      it creates the right Potion. So for example if I want to create a potion of regeneration, the data value will beĀ 8193. And it works fine.

      But the problem appears when I change for example the name of the potion

      ItemMeta itemMeta = itemStack.getItemMeta();
      itemMeta.setDisplayName(name);

      Now, it will change the potion into uncraftable potion and there will not be any effect on it, it's color will also change to pink.

      This bug is most probably present also for lore, enchantments and item flags.

            Unassigned Unassigned
            Lolokar Productions Lolokar Productions
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: