diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-04-05 10:56:09 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 10:56:09 +1100 |
commit | 940b961edc0bea93fafa99764454196b0d47e42b (patch) | |
tree | c26528128271c5a008cc55d8387231862efec622 /src/main/java/at/hannibal2/skyhanni/events | |
parent | d991a496edc2181806e56dd5aea07161349a4e87 (diff) | |
download | skyhanni-940b961edc0bea93fafa99764454196b0d47e42b.tar.gz skyhanni-940b961edc0bea93fafa99764454196b0d47e42b.tar.bz2 skyhanni-940b961edc0bea93fafa99764454196b0d47e42b.zip |
Backend: Use only one inventory close event (#1184)
* use only one inventory close event
* fix InventoryCloseEvent not getting called when closing player inventory, not fully opened inventories, and sometimes leaving inventories by opening other mod menus
* used event in minion collection, and renamed functions
---------
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt index 7b94efd55..70e87a53e 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt @@ -1,12 +1,3 @@ package at.hannibal2.skyhanni.events -import at.hannibal2.skyhanni.data.OtherInventoryData -import net.minecraft.item.ItemStack - -class InventoryCloseEvent(val inventory: OtherInventoryData.Inventory, val reopenSameName: Boolean) : LorenzEvent() { - - val inventoryId: Int by lazy { inventory.windowId } - val inventoryName: String by lazy { inventory.title } - val inventorySize: Int by lazy { inventory.slotCount } - val inventoryItems: Map<Int, ItemStack> by lazy { inventory.items } -} +class InventoryCloseEvent(val reopenSameName: Boolean) : LorenzEvent() |