Class PlayerChatEvent.ChatResult

    • Method Detail

      • isAllowed

        public boolean isAllowed()
        Description copied from interface: ResultedEvent.Result
        Returns whether or not the event is allowed to proceed. Plugins may choose to skip denied events, and the proxy will respect the result of this method.
        Specified by:
        isAllowed in interface ResultedEvent.Result
        Returns:
        whether or not the event is allowed to proceed
      • allowed

        public static PlayerChatEvent.ChatResult allowed()
        Allows the message to be sent, without modification.
        Returns:
        the allowed result
      • message

        public static PlayerChatEvent.ChatResult message​(@NonNull String message)
        Allows the message to be sent, but silently replaced with another.
        Parameters:
        message - the message to use instead
        Returns:
        a result with a new message