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 | |
| 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')
76 files changed, 221 insertions, 214 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt index 3fce3b4d3..38e012128 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarCancelledBuyOrderClipboard.kt @@ -42,7 +42,7 @@ class BazaarCancelledBuyOrderClipboard { patternCancelledMessage.matchMatcher(event.message) { event.blockedReason = "bazaar cancelled buy order clipbaord" val coins = group("coins") - LorenzUtils.chat("§e[SkyHanni] Bazaar buy order cancelled. $latestAmount saved to clipboard. ($coins coins)") + LorenzUtils.chat("Bazaar buy order cancelled. $latestAmount saved to clipboard. ($coins coins)") latestAmount?.let { OSUtils.copyToClipboard(it.replace(",", "")) } latestAmount = null @@ -50,4 +50,4 @@ class BazaarCancelledBuyOrderClipboard { } fun isEnabled() = LorenzUtils.inSkyBlock && SkyHanniMod.feature.bazaar.cancelledBuyOrderClipboard -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt index 0badd1e57..b59eae0b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt @@ -51,11 +51,11 @@ class BingoCardDisplay { fun toggleCommand() { if (!LorenzUtils.isBingoProfile) { - LorenzUtils.chat("§cThis command only works on a bingo profile!") + LorenzUtils.userError("This command only works on a bingo profile!") return } if (!config.enabled) { - LorenzUtils.chat("§cBingo Card is disabled in the config!") + LorenzUtils.userError("Bingo Card is disabled in the config!") return } toggleMode() @@ -189,4 +189,4 @@ class BingoCardDisplay { fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(2, "bingo", "event.bingo") } -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt index fd077824b..8e74b434f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt @@ -200,7 +200,7 @@ class BingoNextStepHelper { done = true updateResult() if (!silent && config.stepHelper) { - LorenzUtils.chat("§e[SkyHanni] A bingo goal step is done! ($displayName)") + LorenzUtils.chat("A bingo goal step is done! ($displayName)") } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt index 5f49d40ce..e686191aa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt @@ -93,7 +93,7 @@ class CompactBingoChat { if (message.contains("Trade") || message.contains("Recipe")) { val text = message.removeColor().replace(" ", "") if (text == "Trade" || text == "Recipe") { - collectionLevelUpLastLine?.let { LorenzUtils.chat(it) } + collectionLevelUpLastLine?.let { LorenzUtils.chat(it, false) } } } else { collectionLevelUpLastLine = message 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) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt index 656ac7b9d..171e45f90 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt @@ -292,8 +292,9 @@ object GhostCounter { notifyCTModule = false if (isUsingCTGhostCounter()) { clickableChat( - "§6[SkyHanni] GhostCounterV3 ChatTriggers module has been detected, do you want to import saved data ? Click here to import data", - "shimportghostcounterdata" + "GhostCounterV3 ChatTriggers module has been detected, do you want to import saved data ? Click here to import data", + "shimportghostcounterdata", + |
