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. black item.png
          14 kB
          xDeeKay
        2. black output.png
          5 kB
          xDeeKay
        3. green item.png
          14 kB
          xDeeKay
        4. green output.png
          7 kB
          xDeeKay

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

              Created:
              Updated:
              Resolved: