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

import moe.nea.firmament.util.unformattedString
import net.minecraft.text.Text

/**
 * Filter whether the user should see a chat message altogether. May or may not be called for every chat packet sent by
 * the server. When that quality is desired, consider [ProcessChatEvent] instead.
 */
data class AllowChatEvent(val text: Text) : FirmamentEvent.Cancellable() {
    val unformattedString = text.unformattedString

    companion object : FirmamentEventBus<AllowChatEvent>()
}