aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-02-29 06:17:29 +1100
committerGitHub <noreply@github.com>2024-02-28 20:17:29 +0100
commit05e5232694e26558b8ebd36c6d337854f9c6c192 (patch)
tree6299fff36a8548b18e955d4729b1ed986293d68b /src/main/java/at/hannibal2/skyhanni/data
parentfbadabdb0ddb0bba18aa7421ffb09795463ea07f (diff)
downloadskyhanni-05e5232694e26558b8ebd36c6d337854f9c6c192.tar.gz
skyhanni-05e5232694e26558b8ebd36c6d337854f9c6c192.tar.bz2
skyhanni-05e5232694e26558b8ebd36c6d337854f9c6c192.zip
Fixed Farming Weight Display sometimes not showing when joining the Garden. (#1073)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/jsonobjects/other/EliteBotJson.kt30
2 files changed, 31 insertions, 13 deletions
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 (?<name>.*)\\.\\.\\."
- )
-
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<WeightProfile>
+)
+
+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<UpcomingLeaderboardPlayer>
+)
+
+data class UpcomingLeaderboardPlayer(
+ @Expose @SerializedName("ign") val name: String,
+ @Expose @SerializedName("amount") val weight: Double
+)