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 ​

ServerMessageEventFabricObject
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 ​

ServerMessageEvent.onAllowChatMessageFabricProperty
kotlin
val onAllowChatMessage

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

Returns ​

to allow the message, false to cancel it.

ServerMessageEvent.onAllowGameMessage ​

ServerMessageEvent.onAllowGameMessageFabricProperty
kotlin
val onAllowGameMessage

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

Returns ​

to allow the message, false to cancel it.

ServerMessageEvent.onAllowCommandMessage ​

ServerMessageEvent.onAllowCommandMessageFabricProperty
kotlin
val onAllowCommandMessage

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

Returns ​

to allow the message, false to cancel it.

ServerMessageEvent.onChatMessage ​

ServerMessageEvent.onChatMessageFabricProperty
kotlin
val onChatMessage

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

ServerMessageEvent.onGameMessage ​

ServerMessageEvent.onGameMessageFabricProperty
kotlin
val onGameMessage

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

ServerMessageEvent.onCommandMessage ​

ServerMessageEvent.onCommandMessageFabricProperty
kotlin
val onCommandMessage

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