Class ServerMessageEvents
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Event<ServerMessageEvents.AllowChatMessage>
An event triggered when the server broadcasts a chat message sent by a player, typically from a client GUI or a player-executed command.static final Event<ServerMessageEvents.AllowCommandMessage>
An event triggered when the server broadcasts a command message to all players, such as one from/me
,/msg
,/say
, and/tellraw
.static final Event<ServerMessageEvents.AllowGameMessage>
An event triggered when the server broadcasts a game message to all players.static final Event<ServerMessageEvents.ChatMessage>
An event triggered when the server broadcasts a chat message sent by a player, typically from a client GUI or a player-executed command.static final Event<ServerMessageEvents.CommandMessage>
An event triggered when the server broadcasts a command message to all players, such as one from/me
,/msg
,/say
, and/tellraw
.static final Event<ServerMessageEvents.GameMessage>
An event triggered when the server broadcasts a game message to all players. -
Method Summary
-
Field Details
-
ALLOW_CHAT_MESSAGE
An event triggered when the server broadcasts a chat message sent by a player, typically from a client GUI or a player-executed command. Mods can use this to block the message.If a listener returned
false
, the message will not be broadcast, the remaining listeners will not be called (if any), andCHAT_MESSAGE
event will not be triggered.If the message is from a player-executed command, this will be called only if
ALLOW_COMMAND_MESSAGE
event did not block the message, and after triggeringCOMMAND_MESSAGE
event. -
ALLOW_GAME_MESSAGE
An event triggered when the server broadcasts a game message to all players. Game messages include death messages, join/leave messages, and advancement messages. Mods can use this to block the message.If a listener returned
false
, the message will not be broadcast, the remaining listeners will not be called (if any), andGAME_MESSAGE
event will not be triggered. -
ALLOW_COMMAND_MESSAGE
An event triggered when the server broadcasts a command message to all players, such as one from/me
,/msg
,/say
, and/tellraw
. Mods can use this to block the message.If a listener returned
false
, the message will not be broadcast, the remaining listeners will not be called (if any), andCOMMAND_MESSAGE
event will not be triggered.If the command is executed by a player and the message is not blocked,
ALLOW_CHAT_MESSAGE
andCHAT_MESSAGE
events will also be triggered after triggeringCOMMAND_MESSAGE
. -
CHAT_MESSAGE
An event triggered when the server broadcasts a chat message sent by a player, typically from a client GUI or a player-executed command. Is not called when chat messages are blocked.If the message is from a player-executed command, this will be called only if
ALLOW_COMMAND_MESSAGE
event did not block the message, and after triggeringCOMMAND_MESSAGE
event. -
GAME_MESSAGE
An event triggered when the server broadcasts a game message to all players. Game messages include death messages, join/leave messages, and advancement messages. Is not called when game messages are blocked. -
COMMAND_MESSAGE
An event triggered when the server broadcasts a command message to all players, such as one from/me
,/msg
,/say
, and/tellraw
. Is not called when command messages are blocked.If the command is executed by a player,
ALLOW_CHAT_MESSAGE
andCHAT_MESSAGE
events will also be triggered after this event.
-