diff options
author | Walker Selby <git@walkerselby.com> | 2023-11-19 00:02:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-19 01:02:48 +0100 |
commit | 0b1fa4dedc21e997234694d9d11805e4996b54b6 (patch) | |
tree | 7bb6d201573f0205bf9ce73f19d65a98fb128e60 /src/main/java/at/hannibal2/skyhanni/features/chat | |
parent | cfa64d7f4360093523029b52dabea8e30ce966b6 (diff) | |
download | skyhanni-0b1fa4dedc21e997234694d9d11805e4996b54b6.tar.gz skyhanni-0b1fa4dedc21e997234694d9d11805e4996b54b6.tar.bz2 skyhanni-0b1fa4dedc21e997234694d9d11805e4996b54b6.zip |
Internal Change: Auto-Prefix Chat Messages (#622)
Add auto prefix to chat message methods. #622
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat')
4 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt index 05a3ba456..3c1586d61 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilterGui.kt @@ -61,11 +61,11 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult if (mouseX in 0..w && mouseY in 0..(size * 10) && (isMouseButtonDown && !wasMouseButtonDown)) { if (KeyboardManager.isShiftKeyDown()) { OSUtils.copyToClipboard(IChatComponent.Serializer.componentToJson(msg.message)) - LorenzUtils.chat("Copied structured chat line to clipboard") + LorenzUtils.chat("Copied structured chat line to clipboard", false) } else { val message = LorenzUtils.stripVanillaMessage(msg.message.formattedText) OSUtils.copyToClipboard(message) - LorenzUtils.chat("Copied chat line to clipboard") + LorenzUtils.chat("Copied chat line to clipboard", false) } } mouseY -= size * 10 @@ -118,4 +118,4 @@ class ChatFilterGui(private val history: List<ChatManager.MessageFilteringResult setScroll(scroll - Mouse.getEventDWheel()) } -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt index 192e51297..ff3444bb0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt @@ -66,13 +66,13 @@ class CompactBestiaryChatMessage { inBestiary = false val title = bestiaryDescription[1] - LorenzUtils.hoverableChat("§6§lBESTIARY §r$title", bestiaryDescription.dropLast(1), command) + LorenzUtils.hoverableChat("§6§lBESTIARY §r$title", bestiaryDescription.dropLast(1), command, false) bestiaryDescription.clear() acceptMoreDescription = true } else { milestoneMessage?.let { - LorenzUtils.chat("§6§lBESTIARY MILESTONE $it") + LorenzUtils.chat("§6§lBESTIARY MILESTONE $it", false) milestoneMessage = null } milestonePattern.matchEntire(message)?.let { diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt index 943490a55..87692135e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt @@ -39,7 +39,7 @@ class PlayerDeathMessages { val name = group("name") if (SkyHanniMod.feature.markedPlayers.highlightInChat && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight && MarkedPlayerManager.isMarkedPlayer(name)) { val reason = group("reason").removeColor() - LorenzUtils.chat(" §c☠ §e$name §7$reason") + LorenzUtils.chat(" §c☠ §e$name §7$reason", false) event.blockedReason = "marked_player_death" return } 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 6105d762a..2cfdb5dc9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/Translator.kt @@ -144,15 +144,15 @@ class Translator { coroutineScope.launch { val translation = getTranslationToEnglish(message) - if (translation == "Unable to translate!") LorenzUtils.chat("§c[SkyHanni] Unable to translate message :( (is it in English?)") - else LorenzUtils.chat("§e[SkyHanni] Found translation: §f$translation") + if (translation == "Unable to translate!") LorenzUtils.userError("Unable to translate message :( (is it in English?)") + else LorenzUtils.chat("Found translation: §f$translation") } } fun fromEnglish(args: Array<String>) { if (!isEnabled()) return if (args.size < 2 || args[0].length != 2) { // args[0] is the language code - LorenzUtils.chat("§cUsage: /shcopytranslation <two letter language code (at the end of a translation)> <message>") + LorenzUtils.userError("Usage: /shcopytranslation <two letter language code (at the end of a translation)> <message>") return } val language = args[0] @@ -163,7 +163,7 @@ class Translator { coroutineScope.launch { val translation = getTranslationFromEnglish(message, language) - LorenzUtils.chat("§e[SkyHanni] Copied translation to clipboard: $translation") + LorenzUtils.chat("Copied translation to clipboard: $translation") OSUtils.copyToClipboard(translation) } } |