From a8973b851ad4d3edb0e6c605eb7aea29c6e66938 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Fri, 22 Mar 2024 18:04:45 +0100 Subject: Improvement: Load Trophy Fishing from NEU (#1123) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: Cal Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> --- .../hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt (limited to 'src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt') 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()) +} -- cgit