From a33686f0bcf9828c0bdd1568724fe6b8826b7027 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:21:52 +1100 Subject: make npc messages not be detected as player messages (#742) Fixed npc messages getting detected as player messages. #742 --- src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt index d5365703a..ccfe97b42 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt @@ -236,6 +236,10 @@ object StringUtils { } if (username == "") return null + if (username.contains("[NPC]")) { + return null + } + if (username.contains(">")) { username = username.substring(username.indexOf('>') + 1).trim() } -- cgit