From 05e5232694e26558b8ebd36c6d337854f9c6c192 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 29 Feb 2024 06:17:29 +1100 Subject: Fixed Farming Weight Display sometimes not showing when joining the Garden. (#1073) --- .../hannibal2/skyhanni/data/ProfileStorageData.kt | 14 +--------- .../data/jsonobjects/other/EliteBotJson.kt | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt index b81e09640..274cf24e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt @@ -3,12 +3,9 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.SackData import at.hannibal2.skyhanni.config.Storage -import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.HypixelJoinEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent import at.hannibal2.skyhanni.utils.ChatUtils @@ -16,10 +13,9 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.UtilsPatterns -import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import kotlin.time.Duration.Companion.seconds import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.seconds object ProfileStorageData { @@ -28,14 +24,6 @@ object ProfileStorageData { var loaded = false private var noTabListTime = SimpleTimeMark.farPast() - private var nextProfile: String? = null - - private val patternGroup = RepoPattern.group("data.profile") - private val profileSwitchPattern by patternGroup.pattern( - "switch", - "ยง7Switching to profile (?.*)\\.\\.\\." - ) - private var sackPlayers: SackData.PlayerSpecific? = null var sackProfiles: SackData.ProfileSpecific? = null diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt new file mode 100644 index 000000000..3cdcfa512 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.data.jsonobjects.other + +import com.google.gson.annotations.Expose +import com.google.gson.annotations.SerializedName + +data class EliteWeightJson( + @Expose val selectedProfileId: String, + @Expose val profiles: List +) + +data class WeightProfile( + @Expose val profileId: String, + @Expose val profileName: String, + @Expose val totalWeight: Double +) + +data class EliteLeaderboardJson( + @Expose val data: EliteLeaderboard +) + +data class EliteLeaderboard( + @Expose val rank: Int, + @Expose val upcomingRank: Int, + @Expose val upcomingPlayers: List +) + +data class UpcomingLeaderboardPlayer( + @Expose @SerializedName("ign") val name: String, + @Expose @SerializedName("amount") val weight: Double +) -- cgit