diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-23 13:38:06 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-23 13:38:06 +0200 |
| commit | a7b17939cca46fc5b0bdcd859df6da25caa143f2 (patch) | |
| tree | b41fd9b0d1fea3ffddfe63e16d2fdb8919e595b1 /src/main/java/at/hannibal2/skyhanni/features/chat | |
| parent | f617d59f1c52ad77f23ce28fb14bf44986e38ed1 (diff) | |
| download | skyhanni-a7b17939cca46fc5b0bdcd859df6da25caa143f2.tar.gz skyhanni-a7b17939cca46fc5b0bdcd859df6da25caa143f2.tar.bz2 skyhanni-a7b17939cca46fc5b0bdcd859df6da25caa143f2.zip | |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt | 7 |
1 files changed, 4 insertions, 3 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 300f8805b..851adb45d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt @@ -29,13 +29,14 @@ class Translator { // Logic for listening for a user click on a chat message is from NotEnoughUpdates @SubscribeEvent(priority = EventPriority.LOWEST) - fun onGuiChat(e: LorenzChatEvent) { + fun onGuiChat(event: LorenzChatEvent) { if (!SkyHanniMod.feature.chat.translator) return - val message = e.message + val message = event.message if (message.getPlayerName() == "-") return - val editedComponent = if (e.chatComponent.siblings.size > 0) e.chatComponent.siblings.last() else e.chatComponent + val editedComponent = + if (event.chatComponent.siblings.size > 0) event.chatComponent.siblings.last() else event.chatComponent val clickStyle = createClickStyle(message.removeColor(), editedComponent.chatStyle) editedComponent.setChatStyle(clickStyle) |
