diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2024-10-11 15:06:51 -0230 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-11 19:36:51 +0200 |
commit | 60f92d58aec0ec976cf1b4933174c1143a20551c (patch) | |
tree | 4175f30a3e42deef2387d81e2c785fae678bdf01 /src/main/java/at/hannibal2/skyhanni/features/slayer | |
parent | 925bb0964d502bdecf74ad14002bdf7c57bb44d6 (diff) | |
download | skyhanni-60f92d58aec0ec976cf1b4933174c1143a20551c.tar.gz skyhanni-60f92d58aec0ec976cf1b4933174c1143a20551c.tar.bz2 skyhanni-60f92d58aec0ec976cf1b4933174c1143a20551c.zip |
Backend: Add event inheritance (#2047)
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer')
3 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt index 162675486..c879c202b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent @@ -148,7 +149,7 @@ object SlayerQuestWarning { return getSlayerData().lastSlayerType == slayerType } - @SubscribeEvent + @HandleEvent(onlyOnSkyblock = true) fun onItemClick(event: ItemClickEvent) { val internalName = event.itemInHand?.getInternalNameOrNull() diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt index df7ab69d9..13186cd96 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt @@ -1,8 +1,10 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.ClickType +import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.EntityClickEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent @@ -203,7 +205,7 @@ object VampireSlayerFeatures { return toChromaColor().withAlpha(config.withAlpha) } - @SubscribeEvent + @HandleEvent(onlyOnIsland = IslandType.THE_RIFT) fun onEntityClick(event: EntityClickEvent) { if (!isEnabled()) return if (event.clickType != ClickType.LEFT_CLICK) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt index 8a5b5f727..2f01af903 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.slayer.blaze import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.core.config.gui.GuiPositionEditor import at.hannibal2.skyhanni.config.features.slayer.blaze.BlazeHellionConfig.FirstDaggerEntry @@ -202,7 +203,7 @@ object BlazeSlayerDaggerHelper { return LorenzUtils.inSkyBlock && config.daggers } - @SubscribeEvent + @HandleEvent(onlyOnSkyblock = true) fun onBlockClick(event: BlockClickEvent) { if (!isEnabled()) return if (clientSideClicked) return |