aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/notenoughupdates/events/ServerChatLineReceivedEvent.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/events/ServerChatLineReceivedEvent.kt')
-rw-r--r--src/main/kotlin/moe/nea/notenoughupdates/events/ServerChatLineReceivedEvent.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/events/ServerChatLineReceivedEvent.kt b/src/main/kotlin/moe/nea/notenoughupdates/events/ServerChatLineReceivedEvent.kt
new file mode 100644
index 0000000..681ec6c
--- /dev/null
+++ b/src/main/kotlin/moe/nea/notenoughupdates/events/ServerChatLineReceivedEvent.kt
@@ -0,0 +1,13 @@
+package moe.nea.notenoughupdates.events
+
+import net.minecraft.text.Text
+import moe.nea.notenoughupdates.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
+}