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

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

              Created:
              Updated:
              Resolved: