aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt
blob: 175271e6902ec2bf25598631da8bb4b702f5ae58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package at.hannibal2.skyhanni.events

import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.jsonobjects.other.HypixelPlayerApiJson
import at.hannibal2.skyhanni.utils.LorenzUtils

class NeuProfileDataLoadedEvent(val playerData: HypixelPlayerApiJson) : LorenzEvent() {
    fun getCurrentProfileData() =
        playerData.profiles.firstOrNull { it.profileName.lowercase() == HypixelData.profileName }

    fun getCurrentPlayerData() = getCurrentProfileData()?.members?.get(LorenzUtils.getPlayerUuid())
}