diff options
author | Roman / Linnea Gräf <roman.graef@gmail.com> | 2023-06-08 09:34:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-08 17:34:19 +1000 |
commit | 5a422e5b879bf62b562bd811ebeba2877c005f78 (patch) | |
tree | 737c5b80e9d7abf40a64df2c690780e5013a78ae /src/main/kotlin | |
parent | 0876e2e7936cdaeee630a5f6d9477f6269e2b3fb (diff) | |
download | NotEnoughUpdates-5a422e5b879bf62b562bd811ebeba2877c005f78.tar.gz NotEnoughUpdates-5a422e5b879bf62b562bd811ebeba2877c005f78.tar.bz2 NotEnoughUpdates-5a422e5b879bf62b562bd811ebeba2877c005f78.zip |
Fix navigation warps being broken by reading chat messages instead of… (#707)
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/dsl.kt | 1 |
1 files changed, 1 insertions, 0 deletions
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 <T : ICommandSender, C : CommandContext<T>> C.reply(component: IChatComponen source.addChatMessage(ChatComponentText("§e[NEU] ").appendSibling(component)) } +@JvmOverloads fun <T : ICommandSender, C : CommandContext<T>> C.reply(text: String, block: ChatComponentText.() -> Unit = {}) { source.addChatMessage(ChatComponentText(text.split("\n").joinToString("\n") { "§e[NEU] $it" }).also(block)) } |