Update KSpigotChat.kt

This commit is contained in:
bluefireoly
2020-11-24 23:20:14 +01:00
parent c95642f484
commit e563c7504e

View File

@@ -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) {