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

getDisplayName not displaying color BLACK

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • git-Spigot-500ff5d-7033f18
    • Yes

      When getting an item display name from the item meta, if the item display name contains the color black, it will be returned without the color. Example code:

      @EventHandler
      public void onInventoryClick(InventoryClickEvent event) {
      Player player = (Player) event.getWhoClicked();
      ItemStack item = event.getCurrentItem();
      player.sendMessage(item.getItemMeta().getDisplayName());
      }
      

      I have given image examples below run with the same code.

      When clicking the item in "black item.png", it outputs "black output.png"

      When clicking the item in "green item.png", it outputs "green output.png"

        1. green output.png
          green output.png
          7 kB
        2. green item.png
          green item.png
          14 kB
        3. black output.png
          black output.png
          5 kB
        4. black item.png
          black item.png
          14 kB

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

              Created:
              Updated:
              Resolved: