aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
index d4e98ba7..62937afc 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
@@ -127,8 +127,13 @@ public class ChatListener {
if (chatComponent.getSiblings().get(0).getChatStyle().getChatClickEvent().getValue().startsWith("/viewprofile")) {
startsWith = "/viewprofile";
partyOrGuildChat = true;
- } else if (chatComponent.getChatStyle().getChatClickEvent().getValue().startsWith("/socialoptions")) {
- startsWith = "/socialoptions";
+ } else {
+ ClickEvent chatClickEvent = chatComponent.getChatStyle().getChatClickEvent();
+ if (chatClickEvent != null) {
+ if (chatClickEvent.getValue().startsWith("/socialoptions")) {
+ startsWith = "/socialoptions";
+ }
+ }
}
if (startsWith != null) {