toComponentWithColors

This method parses every ColorCode in the String by using a MiniMessage It parses using the color codes found here

It also supports the <smallcaps> tag, which converts the text to small caps (not supported by MiniMessage by default). Usage of that: My small caps text Normal text again

Example

// Parse the String with custom colors to a component and send it to a player
myPlayer.sendMessage("<red>My red <rainbow>and now rainbow text! Wow!</rainbow>".toComponentWithColors())

Return

String with everything parsed as Component