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

ChatColor.RESET does not work in ItemMeta to reset italics

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • git-Spigot-16d7899-4ff609e (MC: 1.16.1) (API version 1.16.1-R0.1-SNAPSHOT)
    • Yes

      Using ChatColor.of, or one of the ChatColor constants on item names or lore makes the text italic even when ChatColor.ITALIC is not used.

       

      Attached is example plugin that gives you a stick when logging in to demonstrate this. The following is the code used to create the item.

       

      ItemStack item = new ItemStack(Material.STICK);
      
      ItemMeta im = item.getItemMeta(); 
      
      im.setDisplayName(ChatColor.of("#ffffff") + "Test " + ChatColor.GREEN + "Test2 " + ChatColor.RESET + "Test3"); 
      im.setLore(Arrays.asList(ChatColor.of("#ffffff") + "Test ", ChatColor.GREEN + "Test2 ", ChatColor.RESET + "Test3"));
      
      item.setItemMeta(im);
      

            Unassigned Unassigned
            joshl5324@gmail.com JishunaMatata
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: