Solved Chat Component API colors

Discussion in 'Spigot Plugin Development' started by Dragonphase, Jun 8, 2016.

  1. I'm trying to create a TextComponent using the player's display name, including all color formatting. For example, if the player's display name is SomePlayer , when I do the following:

    Code (Text):
    TextComponent playerNameComponent = new TextComponent(player.getDisplayName());
    I want it to transfer all formatting into the text component. However, when I do that, it just strips all formatting. Is there anything I can do?