Class ClientSendMessageEvents
java.lang.Object
net.fabricmc.fabric.api.client.message.v1.ClientSendMessageEvents
Contains client-side events triggered when sending messages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Event<ClientSendMessageEvents.AllowChat>An event triggered when the client is about to send a chat message, typically from a client GUI.static final Event<ClientSendMessageEvents.AllowCommand>An event triggered when the client is about to send a command, which is whenever the player executes a command including client commands registered withfabric-command-api.static final Event<ClientSendMessageEvents.Chat>An event triggered when the client sends a chat message, typically from a client GUI.static final Event<ClientSendMessageEvents.ChatCanceled>An event triggered when sending a chat message is canceled withALLOW_CHAT.static final Event<ClientSendMessageEvents.Command>An event triggered when the client sends a command, which is whenever the player executes a command including client commands registered withfabric-command-api.static final Event<ClientSendMessageEvents.CommandCanceled>An event triggered when sending a command is canceled withALLOW_COMMAND.static final Event<ClientSendMessageEvents.ModifyChat>An event triggered when the client sends a chat message, typically from a client GUI.static final Event<ClientSendMessageEvents.ModifyCommand>An event triggered when the client sends a command, which is whenever the player executes a command including client commands registered withfabric-command-api. -
Method Summary
-
Field Details
-
ALLOW_CHAT
An event triggered when the client is about to send a chat message, typically from a client GUI. Mods can use this to block the message.If a listener returned
false, the message will not be sent, the remaining listeners will not be called (if any), andCHAT_CANCELEDwill be triggered instead ofMODIFY_CHAT. -
ALLOW_COMMAND
An event triggered when the client is about to send a command, which is whenever the player executes a command including client commands registered withfabric-command-api. Mods can use this to block the message. The command string does not include a slash at the beginning.If a listener returned
false, the command will not be sent, the remaining listeners will not be called (if any), andCOMMAND_CANCELEDwill be triggered instead ofMODIFY_COMMAND. -
MODIFY_CHAT
An event triggered when the client sends a chat message, typically from a client GUI. Is not called when chat messages are blocked. Mods can use this to modify the message. UseCHATif not modifying the message. -
MODIFY_COMMAND
An event triggered when the client sends a command, which is whenever the player executes a command including client commands registered withfabric-command-api. Is not called when command messages are blocked. The command string does not include a slash at the beginning. Mods can use this to modify the command. UseCOMMANDif not modifying the command. -
CHAT
An event triggered when the client sends a chat message, typically from a client GUI. Is not called when chat messages are blocked. Mods can use this to listen to the message. -
COMMAND
An event triggered when the client sends a command, which is whenever the player executes a command including client commands registered withfabric-command-api. Is not called when command messages are blocked. The command string does not include a slash at the beginning. Mods can use this to listen to the command. -
CHAT_CANCELED
An event triggered when sending a chat message is canceled withALLOW_CHAT. -
COMMAND_CANCELED
An event triggered when sending a command is canceled withALLOW_COMMAND. The command string does not include a slash at the beginning.
-