summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/fishing
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-15 14:14:19 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-15 14:14:19 +0200
commitceef1d3be403db7ee5f8cbda8c49f3370d35df78 (patch)
treef271d2b943e37331a6f87b352dd3e670af65b7c6 /src/main/java/at/hannibal2/skyhanni/features/fishing
parentecb40c801ab44118059c1ef07438dfacd75e3927 (diff)
downloadskyhanni-ceef1d3be403db7ee5f8cbda8c49f3370d35df78.tar.gz
skyhanni-ceef1d3be403db7ee5f8cbda8c49f3370d35df78.tar.bz2
skyhanni-ceef1d3be403db7ee5f8cbda8c49f3370d35df78.zip
removed hypixel api
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt27
1 files changed, 0 insertions, 27 deletions
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
@@ -12,29 +10,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 {
val json = event.getConstant<TrophyFishJson>("TrophyFish")
@@ -48,8 +23,6 @@ class TrophyFishManager {
}
companion object {
- private var hasLoadedTrophyFish = false
-
val fishes: MutableMap<String, MutableMap<TrophyRarity, Int>>?
get() = ProfileStorageData.profileSpecific?.crimsonIsle?.trophyFishes