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 | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 176266d1d..a2c1f1aa3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -69,12 +69,8 @@ object ItemUtils { } } - if (withCursorItem) { - if (player.inventory != null) { - if (player.inventory.itemStack != null) { - list.add(player.inventory.itemStack) - } - } + if (withCursorItem && player.inventory != null && player.inventory.itemStack != null) { + list.add(player.inventory.itemStack) } return list } @@ -92,14 +88,9 @@ object ItemUtils { } } - if (withCursorItem) { - if (player.inventory != null) { - if (player.inventory.itemStack != null) { - map[player.inventory.itemStack] = -1 - } - } + if (withCursorItem && player.inventory != null && player.inventory.itemStack != null) { + map[player.inventory.itemStack] = -1 } - return map } |