diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt index 0a0a6b819..fc046c965 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt @@ -133,7 +133,7 @@ object MaxwellAPI { // load earlier, so that other features can already use the api in this event @SubscribeEvent(priority = EventPriority.HIGH) - fun onInventoryFullyLoaded(event: InventoryOpenEvent) { + fun onInventoryOpen(event: InventoryOpenEvent) { if (!isEnabled()) return if (isThaumaturgyInventory(event.inventoryName)) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt index 8fbd3531e..2297b3cf5 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt @@ -134,20 +134,18 @@ object QuiverAPI { clearedPattern.matchMatcher(message) { currentAmount = 0 arrowAmount.clear() - return } arrowResetPattern.matchMatcher(message) { currentArrow = NONE_ARROW_TYPE currentAmount = 0 - return } } @SubscribeEvent - fun onInventoryFullyLoaded(event: InventoryFullyOpenedEvent) { + fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (!isEnabled()) return if (!quiverInventoryNamePattern.matches(event.inventoryName)) return @@ -158,9 +156,7 @@ object QuiverAPI { val stacks = event.inventoryItems for (stack in stacks.values) { if (stack.getItemCategoryOrNull() != ItemCategory.ARROW) continue - val arrow = stack.getInternalNameOrNull() ?: continue - val arrowType = getArrowByNameOrNull(arrow) ?: continue arrowAmount.addOrPut(arrowType.internalName, stack.stackSize.toFloat()) |