From e563c7504e6d27213558b1e5870c972e232ad13a Mon Sep 17 00:00:00 2001 From: bluefireoly Date: Tue, 24 Nov 2020 23:20:14 +0100 Subject: [PATCH] Update KSpigotChat.kt --- src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {