diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-06-17 02:17:14 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-16 18:17:14 +0200 |
commit | b81197a01853cf819450aeac9c155935e424c5a5 (patch) | |
tree | 7685b3d9df1672a778c828b70f9a02aa9aa9b244 /src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt | |
parent | cb828a9248e6c28da7abaa16cfbb9d112076bd24 (diff) | |
download | skyhanni-b81197a01853cf819450aeac9c155935e424c5a5.tar.gz skyhanni-b81197a01853cf819450aeac9c155935e424c5a5.tar.bz2 skyhanni-b81197a01853cf819450aeac9c155935e424c5a5.zip |
Backend: Cleanup some scoreboard event stuff (#1940)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt index 289c9c58b..47d38ef74 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent -import at.hannibal2.skyhanni.events.ScoreboardChangeEvent +import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent import at.hannibal2.skyhanni.events.ServerBlockChangeEvent import at.hannibal2.skyhanni.events.mining.OreMinedEvent import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern @@ -102,8 +102,8 @@ object MiningAPI { fun inColdIsland() = inAnyIsland(IslandType.DWARVEN_MINES, IslandType.MINESHAFT) @SubscribeEvent - fun onScoreboardChange(event: ScoreboardChangeEvent) { - val newCold = event.newList.matchFirst(ScoreboardPattern.coldPattern) { + fun onScoreboardChange(event: ScoreboardUpdateEvent) { + val newCold = event.scoreboard.matchFirst(ScoreboardPattern.coldPattern) { group("cold").toInt().absoluteValue } ?: return |