Changing a potion display name makes it lose all effects

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      Centos 7
      JDK 8u101

    • None

      After changing the potion or monster egg display name the item will lost all its attributes (see attachment).

      Code:

                      ItemStack pot1 = new ItemStack(Material.POTION, 1, (short) 16378);
                      ItemStack egg1 = new ItemStack(Material.MONSTER_EGG, 1, (short) 90);
                      
                      ItemStack egg2 = new ItemStack(Material.MONSTER_EGG, 1, (short) 90);
                      ItemMeta meta = egg2.getItemMeta();
                      meta.setDisplayName("EGG");
                      egg2.setItemMeta(meta);
                      
                      ItemStack pot2 = new ItemStack(Material.POTION, 1, (short) 16378);
                      ItemMeta meta2 = pot2.getItemMeta();
                      meta2.setDisplayName("POTION");
                      pot2.setItemMeta(meta2);
                      
                      Inventory inv = Bukkit.createInventory(null, 54);
                      inv.addItem(pot1.clone(), egg1.clone(), pot2.clone(), egg2.clone());
                      p.openInventory(inv);
                      
                      p.getInventory().addItem(pot1, egg1, pot2, egg2);
      

            Assignee:
            Unassigned
            Reporter:
            Furmiga Humana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: