Class PlayerChatEvent.ChatResult

    • Method Detail

      • getMessage

        public java.util.Optional<java.lang.String> getMessage()
      • 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
        whether or not the event is allowed to proceed
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • allowed

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

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