diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt index 2cfdb5dc9..3cc67e617 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt @@ -25,7 +25,7 @@ class Translator { // Logic for listening for a user click on a chat message is from NotEnoughUpdates @SubscribeEvent(priority = EventPriority.LOWEST) - fun onGuiChat(event: LorenzChatEvent) { + fun onChat(event: LorenzChatEvent) { if (!isEnabled()) return val message = event.message 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() } |