color

fun color(input: String, target: Player? = null): Component

Color a string using the MiniMessage API or Bukkit's legacy color codes You can use placeholders using PlaceholderAPI but you need to set it up in your plugin @onEnable first using SystemCore.placeHolderAPIHook(true)

Return

The colored string as a Component

  • Example usage:

val message = ChatUtil.color("&aHello, &bworld!")
player.sendMessage(message)

Parameters

input

The string to color


fun color(messages: List<String>, target: Player? = null): List<Component>

Colors a list of strings using MiniMessage API or Bukkit's legacy color codes.

Return

A list of colored Components.

Parameters

messages

List of strings to color.