Class ServerMessageEvents
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interface -
Field Summary
FieldsModifier 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/meand/say(but not ones that specify the recipients like/msg).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/meand/say(but not ones that specify the recipients like/msg).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_MESSAGEevent will not be triggered.If the message is from a player-executed command, this will be called only if
ALLOW_COMMAND_MESSAGEevent did not block the message, and after triggeringCOMMAND_MESSAGEevent. -
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_MESSAGEevent will not be triggered. -
ALLOW_COMMAND_MESSAGE
An event triggered when the server broadcasts a command message to all players, such as one from/meand/say(but not ones that specify the recipients like/msg). 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_MESSAGEevent will not be triggered.If the command is executed by a player and the message is not blocked,
ALLOW_CHAT_MESSAGEandCHAT_MESSAGEevents 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_MESSAGEevent did not block the message, and after triggeringCOMMAND_MESSAGEevent. -
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/meand/say(but not ones that specify the recipients like/msg). Is not called when command messages are blocked.If the command is executed by a player,
ALLOW_CHAT_MESSAGEandCHAT_MESSAGEevents will also be triggered after this event.
-