Skip to content
On this page

Fabric

ServerMessageEvent

top.katton.api.eventfabric/src/main/kotlin/top/katton/api/event/ServerMessageEvent.kt
Server-side message events for Fabric platform.

ServerMessageEvent

FabricObject
kotlin
object ServerMessageEvent

Server-side message events for Fabric platform.

This object provides events related to chat messages, game messages, and command messages. Includes both allow events (can cancel) and handler events (notification only).

ServerMessageEvent.onAllowChatMessage

FabricProperty
kotlin
val onAllowChatMessage

Event triggered to allow or deny a chat message from being sent.

Returns

true to allow the message, false to cancel it.

ServerMessageEvent.onAllowGameMessage

FabricProperty
kotlin
val onAllowGameMessage

Event triggered to allow or deny a game message from being sent.

Returns

true to allow the message, false to cancel it.

ServerMessageEvent.onAllowCommandMessage

FabricProperty
kotlin
val onAllowCommandMessage

Event triggered to allow or deny a command message from being sent.

Returns

true to allow the message, false to cancel it.

ServerMessageEvent.onChatMessage

FabricProperty
kotlin
val onChatMessage

Event triggered when a chat message is sent (after being allowed).

ServerMessageEvent.onGameMessage

FabricProperty
kotlin
val onGameMessage

Event triggered when a game message is sent (after being allowed).

ServerMessageEvent.onCommandMessage

FabricProperty
kotlin
val onCommandMessage

Event triggered when a command message is sent (after being allowed).