aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/events/ChatReceived.kt
blob: a352c276c7185a056d73d2d0954126ced85ce665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package moe.nea.ledger.events

import moe.nea.ledger.unformattedString
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.unformattedString().trimEnd()
    )
}