Interface ClientSendMessageEvents.AllowCommand
- Enclosing class:
ClientSendMessageEvents
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallowSendCommandMessage(String command) Called when the client is about to send a command, which is whenever the player executes a command including client commands registered withfabric-command-api.
-
Method Details
-
allowSendCommandMessage
Called when the client is about to send a command, which is whenever the player executes a command including client commands registered withfabric-command-api. Returningfalseprevents the command from being sent, andClientSendMessageEvents.COMMAND_CANCELEDwill be triggered instead ofClientSendMessageEvents.MODIFY_COMMAND. The command string does not include a slash at the beginning.- Parameters:
command- the command that will be sent to the server, without a slash at the beginning.- Returns:
trueif the command should be sent, otherwisefalse
-