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

rgb hex colours not supported in several places

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Java 14, Windows 10

    • CraftBukkit version git-Spigot-758abbe-614fbae (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
    • Yes

      Inventory#setTitle(String), BookMeta#setTitle(String[]), ItemMeta#setDisplayName(String) and ItemMeta#setLore(List<String>) don't respect the rgb hex colours created using net.md_5.bungee.api.ChatColor#of(String).

      Steps to reproduce:

      Have a plugin that creates a custom inventory with a custom title with in it some custom items with custom names and titles that use rgb chatcolours.

      Verify in-game that the text does not display in the right colour. Digging through "/data get entity @p" it shows that in the cases mentioned a regular string text component is used with legacy text in it.

      In my example I expected to find text coloured brown, but I got black instead.

      Interestingly text in book pages did display in the correct brown colour.

       

       

        1. BookTitle.png
          BookTitle.png
          22 kB
        2. DataGet.JPG
          DataGet.JPG
          62 kB
        3. DisplayNameAndLore.png
          DisplayNameAndLore.png
          730 kB
        4. HexItemName.java
          2 kB
        5. hex-item-name-1.0-SNAPSHOT.jar
          4 kB
        6. inventory_title.JPG
          inventory_title.JPG
          24 kB
        7. plugin.yml
          0.4 kB
        8. pom.xml
          3 kB

            Unassigned Unassigned
            Jannyboy11 Jan Boerman
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: