aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-06-09 18:08:38 +0200
committernea <nea@nea.moe>2023-06-09 18:08:38 +0200
commit428056ff805839e04443dcff3badd021eb4abe01 (patch)
tree1dfb5b4dc84bc0884dc319be7f8ad4e949decb81 /src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
parente7a7b04d8cadbc08d12272e8c59bff711be4d463 (diff)
downloadfirmament-428056ff805839e04443dcff3badd021eb4abe01.tar.gz
firmament-428056ff805839e04443dcff3badd021eb4abe01.tar.bz2
firmament-428056ff805839e04443dcff3badd021eb4abe01.zip
Add support for other mods using /locraw
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
new file mode 100644
index 0000000..604422d
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
@@ -0,0 +1,14 @@
+package moe.nea.firmament.events
+
+import net.minecraft.text.Text
+import moe.nea.firmament.util.unformattedString
+
+/**
+ * Published just before a message is added to the chat gui. Cancelling only prevents rendering, not logging to the
+ * console.
+ */
+data class ClientChatLineReceivedEvent(val text: Text) : FirmamentEvent.Cancellable() {
+ val unformattedString = text.unformattedString
+
+ companion object : FirmamentEventBus<ClientChatLineReceivedEvent>()
+}