1 2 3 4 5 6 7 8
package at.hannibal2.skyhanni.utils import net.minecraft.util.ChatComponentText object ChatComponentUtils { fun text(text: String, init: ChatComponentText.() -> Unit = {}): ChatComponentText = ChatComponentText(text).also(init) }