diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-11-30 21:21:52 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 11:21:52 +0100 |
commit | a33686f0bcf9828c0bdd1568724fe6b8826b7027 (patch) | |
tree | 6022819f9ee9c60abdf8d17daa8da310299ae34d /src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt | |
parent | 592a565cb0d030481e2e093f983c754600e288c1 (diff) | |
download | skyhanni-a33686f0bcf9828c0bdd1568724fe6b8826b7027.tar.gz skyhanni-a33686f0bcf9828c0bdd1568724fe6b8826b7027.tar.bz2 skyhanni-a33686f0bcf9828c0bdd1568724fe6b8826b7027.zip |
make npc messages not be detected as player messages (#742)
Fixed npc messages getting detected as player messages. #742
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt | 4 |
1 files changed, 4 insertions, 0 deletions
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() } |