diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt index 80cfba4002bf..c68b595d93e3 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt @@ -20,7 +20,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.firstMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object CollectionAPI { @@ -63,8 +62,8 @@ object CollectionAPI { collectionValue.clear() } - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { val inventoryName = event.inventoryName if (inventoryName.endsWith(" Collection")) { val stack = event.inventoryItems[4] ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt index b7e4b4b850c5..b95100ba03c2 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt @@ -100,7 +100,7 @@ object GetFromSackAPI { } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { inventoryMap.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt index 3aa7aaf080af..e8fe1b0019ee 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt @@ -163,8 +163,8 @@ object SkillAPI { } } - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (event.inventoryName != "Your Skills") return for (stack in event.inventoryItems.values) { val lore = stack.getLore() diff --git a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt index 9bdf37f409ce..434b30df51bf 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt @@ -252,8 +252,8 @@ object BitsAPI { fun bitsPerCookie(): Int = (defaultCookieBits * (currentFameRank?.bitsMultiplier ?: 1.0)).toInt() - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!isEnabled()) return val stacks = event.inventoryItems diff --git a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt index beec86281a4a..df55456a052d 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt @@ -35,8 +35,8 @@ object CropAccessoryData { accessoryInInventory = CropAccessory.NONE } - @SubscribeEvent - fun onInventoryOpen(event: InventoryUpdatedEvent) { + @HandleEvent + fun onInventoryUpdated(event: InventoryUpdatedEvent) { if (!accessoryBagNamePattern.matches(event.inventoryName)) return val items = event.inventoryItems.mapNotNull { it.value } diff --git a/src/main/java/at/hannibal2/skyhanni/data/ElectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/ElectionAPI.kt index e61d03af83d9..9d17ceccaddc 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ElectionAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ElectionAPI.kt @@ -162,8 +162,8 @@ object ElectionAPI { } } - @SubscribeEvent - fun onInventory(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return if (!calendarGuiPattern.matches(event.inventoryName)) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt index 18093b880b86..62eb8109536b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.model.ComposterUpgrade import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -8,13 +9,12 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object GardenComposterUpgradesData { - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!GardenAPI.inGarden()) return if (event.inventoryName != "Composter Upgrades") return for (item in event.inventoryItems.values) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt index ca48777bc6ed..ba103cf601dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.jsonobjects.repo.GardenJson import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent @@ -49,8 +50,8 @@ object GardenCropMilestones { return null } - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (event.inventoryName != "Crop Milestones") return for ((_, stack) in event.inventoryItems) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt index 7a53507e0af8..94be96c0eac2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.features.garden.CropType @@ -48,8 +49,8 @@ object GardenCropUpgrades { } } - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!GardenAPI.inGarden()) return if (event.inventoryName != "Crop Upgrades") return diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt index 457b6c42648f..09d433d3a536 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt @@ -60,7 +60,7 @@ object GuiData { if (preDrawEventCancelled) event.isCanceled = true } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { DelayedRun.runNextTick { if (Minecraft.getMinecraft().currentScreen !is GuiChest) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt b/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt index c5aa22e66fd7..c69c2dbd3e42 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent @@ -15,12 +16,12 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object HighlightOnHoverSlot { val currentSlots = mutableMapOf, List>() - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryOpenEvent) { currentSlots.clear() } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { currentSlots.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index 39bc5b948665..52a356051f73 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -706,7 +706,7 @@ enum class HotmData( } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { if (!inInventory) return inInventory = false @@ -714,8 +714,8 @@ enum class HotmData( heartItem = null } - @SubscribeEvent - fun onInventoryFullyOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return inInventory = inventoryPattern.matches(event.inventoryName) if (!inInventory) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt index f35f024a14bf..5fa0106173d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt @@ -40,14 +40,14 @@ object ItemAddManager { private var inSackInventory = false private var lastSackInventoryLeave = SimpleTimeMark.farPast() - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryOpenEvent) { if (event.inventoryName.contains("Sack")) { inSackInventory = true } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { if (inSackInventory) { inSackInventory = false diff --git a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt index 8c51ea78fc5d..0dde33126c97 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.jsonobjects.repo.MaxwellPowersJson import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -24,7 +25,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpace import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import com.google.gson.annotations.Expose import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Pattern @@ -189,7 +189,7 @@ object MaxwellAPI { } // load earlier, so that other features can already use the api in this event - @SubscribeEvent(priority = EventPriority.HIGH) + @HandleEvent(priority = HandleEvent.HIGH) fun onInventoryOpen(event: InventoryOpenEvent) { if (!isEnabled()) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt index 02f3910196ac..cd4224bb2cdb 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt @@ -27,14 +27,14 @@ object OtherInventoryData { } fun close(reopenSameName: Boolean = false) { - InventoryCloseEvent(reopenSameName).postAndCatch() + InventoryCloseEvent(reopenSameName).post() currentInventory = null } @SubscribeEvent fun onTick(event: LorenzTickEvent) { lateEvent?.let { - it.postAndCatch() + it.post() lateEvent = null } } @@ -95,9 +95,9 @@ object OtherInventoryData { } private fun done(inventory: Inventory) { - InventoryFullyOpenedEvent(inventory).postAndCatch() + InventoryFullyOpenedEvent(inventory).post() inventory.fullyOpenedOnce = true - InventoryUpdatedEvent(inventory).postAndCatch() + InventoryUpdatedEvent(inventory).post() acceptItems = false } diff --git a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt index 7fdea1b779ba..1578bdad2aac 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt @@ -113,7 +113,7 @@ object OwnInventoryData { } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { val item = Minecraft.getMinecraft().thePlayer.inventory.itemStack ?: return val internalNameOrNull = item.getInternalNameOrNull() ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt index ef2494837c3a..3c8b5b163d65 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt @@ -12,7 +12,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.firstMatcher import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds @SkyHanniModule @@ -40,7 +39,7 @@ object PurseAPI { var currentPurse = 0.0 private set - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { inventoryCloseTime = SimpleTimeMark.now() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt index 4367c14829ed..bc5f0e10a29f 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt @@ -1,7 +1,6 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.event.HandleEvent -import at.hannibal2.skyhanni.data.QuiverAPI.currentArrow import at.hannibal2.skyhanni.data.jsonobjects.repo.ArrowTypeJson import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -210,8 +209,8 @@ object QuiverAPI { return } - @SubscribeEvent - fun onInventoryFullyLoaded(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!isEnabled()) return if (!quiverInventoryNamePattern.matches(event.inventoryName)) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index da619fd9eb61..4b6ec9fee0c1 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -102,7 +102,7 @@ object SackAPI { var sackListNames = emptySet() private set - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { inSackInventory = false isRuneSack = false @@ -114,8 +114,8 @@ object SackAPI { stackList.clear() } - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { val inventoryName = event.inventoryName val isNewInventory = inventoryName != lastOpenedInventory lastOpenedInventory = inventoryName diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt index 2b64ed1ab33d..e7e46ff53f5a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt @@ -16,7 +16,7 @@ object ScreenData { if (wasOpen == isOpen) return wasOpen = isOpen if (!wasOpen) { - InventoryCloseEvent(false).postAndCatch() + InventoryCloseEvent(false).post() } } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt b/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt index 313e2f5f61fc..830da8894d17 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt @@ -13,7 +13,6 @@ import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object SkillExperience { @@ -47,8 +46,8 @@ object SkillExperience { } } - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (event.inventoryName != "Your Skills") return for ((_, stack) in event.inventoryItems) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt index 55e104a15e8c..5f0fa6225150 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt @@ -14,7 +14,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.allLettersFirstUppercase import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import org.intellij.lang.annotations.Language import java.util.EnumMap import java.util.regex.Pattern @@ -128,8 +127,8 @@ enum class SkyblockStat( } } - @SubscribeEvent - fun onInventory(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return onSkyblockMenu(event) onStatsMenu(event) diff --git a/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt index 70e87a53e71e..948c9bc5ab02 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class InventoryCloseEvent(val reopenSameName: Boolean) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class InventoryCloseEvent(val reopenSameName: Boolean) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt index d599fdf3aef1..cdf03cf1c031 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt @@ -1,11 +1,12 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.OtherInventoryData import at.hannibal2.skyhanni.utils.PrimitiveItemStack import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.toPrimitiveStackOrNull import net.minecraft.item.ItemStack -open class InventoryOpenEvent(private val inventory: OtherInventoryData.Inventory) : LorenzEvent() { +open class InventoryOpenEvent(private val inventory: OtherInventoryData.Inventory) : SkyHanniEvent() { val inventoryId: Int get() = inventory.windowId val inventoryName: String get() = inventory.title diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index 05ab00ed1cc7..5087c6380fc6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -263,8 +263,8 @@ object MinionCraftHelper { private fun isMinionName(itemName: String) = itemName.contains(" Minion ") && !itemName.contains(" Minion Skin") - @SubscribeEvent - fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + @HandleEvent + fun onInventoryFullyOpened(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.isBingoProfile) return if (event.inventoryName != "Crafted Minions") return diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt index 98b266053e04..98cef084610d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.bingo.card import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoData import at.hannibal2.skyhanni.events.InventoryUpdatedEvent import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -41,7 +42,7 @@ object BingoCardReader { ".*§7§eThe next hint will unlock in (?