Class ChatMessage


  • public class ChatMessage
    extends Object
    An event where a new chat message is received.

    See ChatMessageType for different message types that can be received.

    Note: This event will not trigger for NPC dialogues.

    • Method Detail

      • getMessageNode

        public MessageNode getMessageNode()
        The underlying MessageNode for the message.
      • getName

        public String getName()
        The name of the player that sent the message.
      • getMessage

        public String getMessage()
        The contents of the message.
      • getSender

        public String getSender()
        The sender of the message.

        This field is only used for friends chat messages and refers to the current name of the friends chat the client is in.

      • getTimestamp

        public int getTimestamp()
        Timestamp of the message.
      • setMessageNode

        public void setMessageNode​(MessageNode messageNode)
        The underlying MessageNode for the message.
      • setType

        public void setType​(ChatMessageType type)
        The type of message received.
      • setName

        public void setName​(String name)
        The name of the player that sent the message.
      • setMessage

        public void setMessage​(String message)
        The contents of the message.
      • setSender

        public void setSender​(String sender)
        The sender of the message.

        This field is only used for friends chat messages and refers to the current name of the friends chat the client is in.

      • setTimestamp

        public void setTimestamp​(int timestamp)
        Timestamp of the message.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object