aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
blob: 604422d645cdc87420773e8d2e196aaeae6a5921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>()
}