diff --git a/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt b/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt index 8be2dbc5..4123964e 100644 --- a/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt +++ b/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt @@ -47,8 +47,8 @@ class KSpigotComponentBuilder { // SPECIAL - fun legacyText(text: String, color: ChatColor = ChatColor.WHITE) { - this += TextComponent.fromLegacyText(text, color) + fun legacyText(text: String, color: ChatColor = ChatColor.WHITE, builder: BaseComponent.() -> Unit = { }) { + this += TextComponent.fromLegacyText(text, color).onEach { it.apply(builder) } } operator fun plusAssign(baseComponent: BaseComponent) {