diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 6af19e382..54cdfa91e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -7,7 +7,6 @@ import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NumberUtil.formatInt import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches -import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.cachedData import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.isRecombobulated @@ -61,10 +60,8 @@ object ItemUtils { fun getItemsInInventory(withCursorItem: Boolean = false): List<ItemStack> { val list: LinkedList<ItemStack> = LinkedList() val player = Minecraft.getMinecraft().thePlayer - if (player == null) { - ChatUtils.error("getItemsInInventoryWithSlots: player is null!") - return list - } + ?: ErrorManager.skyHanniError("getItemsInInventoryWithSlots: player is null!") + for (slot in player.openContainer.inventorySlots) { if (slot.hasStack) { list.add(slot.stack) |