diff options
author | David Cole <40234707+DavidArthurCole@users.noreply.github.com> | 2024-09-28 15:23:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-28 21:23:23 +0200 |
commit | 2178deb82a1cc3305113db1fbeee939cd7272d2e (patch) | |
tree | b711c96d4af599588f3bd32b5d4229f8c24251b2 /src/main/java/at/hannibal2/skyhanni/features/chat | |
parent | 633b8f0bdd9b05f553b1bc521a83b4b7de238125 (diff) | |
download | skyhanni-2178deb82a1cc3305113db1fbeee939cd7272d2e.tar.gz skyhanni-2178deb82a1cc3305113db1fbeee939cd7272d2e.tar.bz2 skyhanni-2178deb82a1cc3305113db1fbeee939cd7272d2e.zip |
Backend: Detekt Fixes Part 3 (#2606)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/chat')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index d058ddc50..4d9af4c9d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -519,6 +519,7 @@ object ChatFilter { * @param message The message to check * @return The reason why the message was blocked, empty if not blocked */ + @Suppress("CyclomaticComplexMethod") private fun block(message: String): String? = when { config.hypixelHub && message.isPresent("lobby") -> "lobby" config.empty && StringUtils.isEmpty(message) -> "empty" diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt index 698a67114..25c1c04cb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PowderMiningChatFilter.kt @@ -252,6 +252,7 @@ object PowderMiningChatFilter { "§r§[fa9][❤❈☘⸕✎✧] (?<tier>Rough|Flawed|Fine|Flawless) (?<gem>Ruby|Amethyst|Jade|Amber|Sapphire|Topaz) Gemstone( §r§8x(?<amount>[\\d,]+))?", ) + @Suppress("CyclomaticComplexMethod") fun block(message: String): String? { // Generic "you uncovered a chest" message if (uncoverChestPattern.matches(message)) return "powder_mining_chest" |