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
ChatMessageTypefor 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 booleancanEqual(Object other)booleanequals(Object o)StringgetMessage()The contents of the message.MessageNodegetMessageNode()The underlying MessageNode for the message.StringgetName()The name of the player that sent the message.StringgetSender()The sender of the message.intgetTimestamp()Timestamp of the message.ChatMessageTypegetType()The type of message received.inthashCode()voidsetMessage(String message)The contents of the message.voidsetMessageNode(MessageNode messageNode)The underlying MessageNode for the message.voidsetName(String name)The name of the player that sent the message.voidsetSender(String sender)The sender of the message.voidsetTimestamp(int timestamp)Timestamp of the message.voidsetType(ChatMessageType type)The type of message received.StringtoString()
-
-
-
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)
-
-