Merge pull request #7719 from Adam-/chatevents

Merge SetMessage and ChatMessage event into one
This commit is contained in:
Adam
2019-02-07 20:55:30 -05:00
committed by GitHub
20 changed files with 179 additions and 211 deletions

View File

@@ -26,7 +26,9 @@ package net.runelite.api.events;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.runelite.api.ChatMessageType;
import net.runelite.api.MessageNode;
/**
* An event where a new chat message is received.
@@ -38,8 +40,13 @@ import net.runelite.api.ChatMessageType;
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ChatMessage
{
/**
* The underlying MessageNode for the message.
*/
private MessageNode messageNode;
/**
* The type of message received.
*/
@@ -59,4 +66,8 @@ public class ChatMessage
* current name of the clan chat the client is in.
*/
private String sender;
/**
* Timestamp of the message.
*/
private int timestamp;
}

View File

@@ -1,43 +0,0 @@
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.ChatMessageType;
import net.runelite.api.MessageNode;
/**
* An event where a {@link MessageNode} has had its message set.
* <p>
* Called whenever a message is received in the chat box.
* <p>
* Editing the {@link #messageNode} properties will reflect the change when
* the message in the chat is rendered. The original values of the message
* are held by the other fields of this event.
*/
@Data
public class SetMessage
{
/**
* The updated message node.
*/
private MessageNode messageNode;
/**
* The set message type.
*/
private ChatMessageType type;
/**
* The name of the player that sent the message.
*/
private String name;
/**
* The sender of the message (ie. clan name).
*/
private String sender;
/**
* The new message value.
*/
private String value;
/**
* Timestamp of the message.
*/
private int timestamp;
}