diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-03-22 18:04:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 18:04:45 +0100 |
commit | a8973b851ad4d3edb0e6c605eb7aea29c6e66938 (patch) | |
tree | 4bb7e04fdc48022fb7d9bdcd42915078bf4f7952 /src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt | |
parent | 6231ce3132dd22b539ed76d5999d281d9109ae0b (diff) | |
download | skyhanni-a8973b851ad4d3edb0e6c605eb7aea29c6e66938.tar.gz skyhanni-a8973b851ad4d3edb0e6c605eb7aea29c6e66938.tar.bz2 skyhanni-a8973b851ad4d3edb0e6c605eb7aea29c6e66938.zip |
Improvement: Load Trophy Fishing from NEU (#1123)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: Cal <cwolfson58@gmail.com>
Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt new file mode 100644 index 000000000..175271e69 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt @@ -0,0 +1,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()) +} |