diff options
author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-23 14:14:15 +0200 |
---|---|---|
committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-23 14:14:15 +0200 |
commit | bb6762a416d12527e3d91b4b91c079e534e5970a (patch) | |
tree | feb88523e7b0509f61a33905c802458248767212 /src | |
parent | 1dda2149ffbfb4e57caca8830edbb59dd3801631 (diff) | |
download | skyhanni-bb6762a416d12527e3d91b4b91c079e534e5970a.tar.gz skyhanni-bb6762a416d12527e3d91b4b91c079e534e5970a.tar.bz2 skyhanni-bb6762a416d12527e3d91b4b91c079e534e5970a.zip |
added support for obfuscated trophy fishes
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/fishing/TrophyFishMessages.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/fishing/TrophyFishMessages.kt b/src/main/java/at/hannibal2/skyhanni/fishing/TrophyFishMessages.kt index 4329a951c..5563e0184 100644 --- a/src/main/java/at/hannibal2/skyhanni/fishing/TrophyFishMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/fishing/TrophyFishMessages.kt @@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileApiDataLoadedEvent -import at.hannibal2.skyhanni.utils.LorenzDebug import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.between import at.hannibal2.skyhanni.utils.LorenzUtils.removeColorCodes @@ -45,8 +44,12 @@ class TrophyFishMessages { if (!SkyHanniMod.feature.fishing.trophyCounter) return val message = event.message - if (message.startsWith("§6§lTROPHY FISH! §r§bYou caught a §r")) { - val displayName = message.between(" a §r", "§r §r") + if (message.startsWith("§6§lTROPHY FISH! §r§bYou caught a")) { + var displayName = if (message.contains(" a §r")) message.between(" a §r", "§r §r") else message.between(" an §r", "§r §r") + if (displayName.contains("§k")) { + displayName = displayName.replace("§k", "") + displayName = displayName.replace("Obfuscated", "Obfuscated Fish") + } val rarity = message.between("§r §r", "§b.").lowercase().replace("§l", "") val name = (rarity + "_" + displayName).removeColorCodes().lowercase().replace(" ", "") |