Package net.runelite.api.events
Class ChatMessage
- java.lang.Object
-
- net.runelite.api.events.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.
-
-
Constructor Summary
Constructors Constructor Description ChatMessage()
ChatMessage(MessageNode messageNode, ChatMessageType type, String name, String message, String sender, int timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getMessage()
The contents of the message.MessageNode
getMessageNode()
The underlying MessageNode for the message.String
getName()
The name of the player that sent the message.String
getSender()
The sender of the message.int
getTimestamp()
Timestamp of the message.ChatMessageType
getType()
The type of message received.int
hashCode()
void
setMessage(String message)
The contents of the message.void
setMessageNode(MessageNode messageNode)
The underlying MessageNode for the message.void
setName(String name)
The name of the player that sent the message.void
setSender(String sender)
The sender of the message.void
setTimestamp(int timestamp)
Timestamp of the message.void
setType(ChatMessageType type)
The type of message received.String
toString()
-
-
-
Constructor Detail
-
ChatMessage
public ChatMessage(MessageNode messageNode, ChatMessageType type, String name, String message, String sender, int timestamp)
-
ChatMessage
public ChatMessage()
-
-
Method Detail
-
getMessageNode
public MessageNode getMessageNode()
The underlying MessageNode for the message.
-
getType
public ChatMessageType getType()
The type of message received.
-
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)
-
-