aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events/ServerChatLineReceivedEvent.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/ServerChatLineReceivedEvent.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/ServerChatLineReceivedEvent.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/ServerChatLineReceivedEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ServerChatLineReceivedEvent.kt
new file mode 100644
index 0000000..7e8531c
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/events/ServerChatLineReceivedEvent.kt
@@ -0,0 +1,13 @@
+package moe.nea.firmament.events
+
+import net.minecraft.text.Text
+import moe.nea.firmament.util.unformattedString
+
+/**
+ * This event gets published whenever the client receives a chat message from the server.
+ */
+data class ServerChatLineReceivedEvent(val text: Text) : NEUEvent.Cancellable() {
+ companion object : NEUEventBus<ServerChatLineReceivedEvent>()
+
+ val unformattedString = text.unformattedString
+}