Interface ClientSendMessageEvents.AllowChat

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.

@FunctionalInterface public static interface ClientSendMessageEvents.AllowChat
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Called when the client is about to send a chat message, typically from a client GUI.
  • Method Details

    • allowSendChatMessage

      boolean allowSendChatMessage(String message)
      Called when the client is about to send a chat message, typically from a client GUI. Returning false prevents the message from being sent, and ClientSendMessageEvents.CHAT_CANCELED will be triggered instead of ClientSendMessageEvents.MODIFY_CHAT.
      Parameters:
      message - the message that will be sent to the server
      Returns:
      true if the message should be sent, otherwise false