diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/ChatReceived.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/ChatReceived.kt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/ChatReceived.kt b/src/main/kotlin/moe/nea/ledger/ChatReceived.kt new file mode 100644 index 0000000..5e19083 --- /dev/null +++ b/src/main/kotlin/moe/nea/ledger/ChatReceived.kt @@ -0,0 +1,15 @@ +package moe.nea.ledger + +import net.minecraftforge.client.event.ClientChatReceivedEvent +import net.minecraftforge.fml.common.eventhandler.Event +import java.time.Instant + +data class ChatReceived( + val message: String, + val timestamp: Instant = Instant.now() +) : Event() { + constructor(event: ClientChatReceivedEvent) : this( + event.message.unformattedText + .replace("ยง.".toRegex(), "") + ) +}
\ No newline at end of file |