From 5a422e5b879bf62b562bd811ebeba2877c005f78 Mon Sep 17 00:00:00 2001 From: Roman / Linnea Gräf Date: Thu, 8 Jun 2023 09:34:19 +0200 Subject: Fix navigation warps being broken by reading chat messages instead of… (#707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/io/github/moulberry/notenoughupdates/util/brigadier/dsl.kt | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/dsl.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/dsl.kt index 1ce00d99..2cd5133e 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/dsl.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/dsl.kt @@ -83,6 +83,7 @@ fun > C.reply(component: IChatComponen source.addChatMessage(ChatComponentText("§e[NEU] ").appendSibling(component)) } +@JvmOverloads fun > C.reply(text: String, block: ChatComponentText.() -> Unit = {}) { source.addChatMessage(ChatComponentText(text.split("\n").joinToString("\n") { "§e[NEU] $it" }).also(block)) } -- cgit