From ceef1d3be403db7ee5f8cbda8c49f3370d35df78 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 15 Aug 2023 14:14:19 +0200 Subject: removed hypixel api --- .../features/fishing/trophy/TrophyFishManager.kt | 27 ---------------------- 1 file changed, 27 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing') diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt index c2f8c508d..c2f4e64fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt @@ -1,8 +1,6 @@ package at.hannibal2.skyhanni.features.fishing.trophy import at.hannibal2.skyhanni.data.ProfileStorageData -import at.hannibal2.skyhanni.events.ProfileApiDataLoadedEvent -import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.jsonobjects.TrophyFishJson @@ -11,29 +9,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class TrophyFishManager { - @SubscribeEvent - fun onProfileJoin(event: ProfileJoinEvent) { - hasLoadedTrophyFish = false - } - - @SubscribeEvent - fun onProfileDataLoad(event: ProfileApiDataLoadedEvent) { - if (hasLoadedTrophyFish) return - val trophyFishes = fishes ?: return - val profileData = event.profileData - trophyFishes.clear() - for ((rawName, value) in profileData["trophy_fish"].asJsonObject.entrySet()) { - val rarity = TrophyRarity.getByName(rawName) ?: continue - val text = rawName.replace("_", "") - val displayName = text.substring(0, text.length - rarity.name.length) - - val amount = value.asInt - val rarities = trophyFishes.getOrPut(displayName) { mutableMapOf() } - rarities[rarity] = amount - hasLoadedTrophyFish = true - } - } - @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { try { @@ -48,8 +23,6 @@ class TrophyFishManager { } companion object { - private var hasLoadedTrophyFish = false - val fishes: MutableMap>? get() = ProfileStorageData.profileSpecific?.crimsonIsle?.trophyFishes -- cgit