aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-13 19:52:56 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-13 19:52:56 +0100
commitbd9b0085ae6e39cada9a5dc8ca20649cb8dc1d6b (patch)
tree355fccffe9a0719328e532203c42f5a28765de9a
parent081122cb0b86f26a6e4237ffe7f67d5e77060b40 (diff)
downloadSkyHanni-bd9b0085ae6e39cada9a5dc8ca20649cb8dc1d6b.tar.gz
SkyHanni-bd9b0085ae6e39cada9a5dc8ca20649cb8dc1d6b.tar.bz2
SkyHanni-bd9b0085ae6e39cada9a5dc8ca20649cb8dc1d6b.zip
Code cleanup
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt
index 200c3e69e..a496bd2b5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt
@@ -47,8 +47,8 @@ class BazaarBestSellMethod {
for (slot in chest.inventorySlots) {
if (slot == null) continue
if (slot.slotNumber == slot.slotIndex) continue
- if (slot.stack == null) continue
- val stack = slot.stack
+ val stack = slot.stack ?: continue
+
var displayName = stack.displayName
if (displayName.endsWith("Enchanted Book")) {
displayName = stack.getLore()[0]