diff options
| author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-06-08 13:33:35 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 13:33:35 +1000 |
| commit | 5b3ee9de1856d9989e20cc4d534cac17089ce0e5 (patch) | |
| tree | 6186c64e1f7d59c2dd04b7ffb05925609811895a /src/main/java/at/hannibal2/skyhanni/features/fishing | |
| parent | aaca5f08d47732b3db5329a3a9404281b21d2f55 (diff) | |
| download | skyhanni-5b3ee9de1856d9989e20cc4d534cac17089ce0e5.tar.gz skyhanni-5b3ee9de1856d9989e20cc4d534cac17089ce0e5.tar.bz2 skyhanni-5b3ee9de1856d9989e20cc4d534cac17089ce0e5.zip | |
Backend: Start using new event system (#2023)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt | 3 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt index c1522c88d..d54f7cf48 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishDisplay.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.fishing.trophy import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.features.fishing.trophyfishing.TrophyFishDisplayConfig.HideCaught import at.hannibal2.skyhanni.config.features.fishing.trophyfishing.TrophyFishDisplayConfig.TextPart import at.hannibal2.skyhanni.config.features.fishing.trophyfishing.TrophyFishDisplayConfig.TrophySorting @@ -58,7 +59,7 @@ object TrophyFishDisplay { } } - @SubscribeEvent + @HandleEvent fun onTrophyFishCaught(event: TrophyFishCaughtEvent) { recentlyDroppedTrophies[getInternalName(event.trophyFishName)] = event.rarity update() diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt index 562ea732a..606f78041 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt @@ -47,7 +47,7 @@ object TrophyFishMessages { val trophyFishes = TrophyFishManager.fish ?: return val trophyFishCounts = trophyFishes.getOrPut(internalName) { mutableMapOf() } val amount = trophyFishCounts.addOrPut(rarity, 1) - TrophyFishCaughtEvent(internalName, rarity).postAndCatch() + TrophyFishCaughtEvent(internalName, rarity).post() if (shouldBlockTrophyFish(rarity, amount)) { event.blockedReason = "low_trophy_fish" |
