diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-30 12:36:34 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-06-30 12:36:34 +0200 |
commit | 2e93920ab64bacfc428cf8bf040a2b10b6d9f2f8 (patch) | |
tree | ae647eb858c2d8aaff30277ad290990d258d1725 /src/main/java/at/hannibal2/skyhanni | |
parent | e51dd4e7c0f94a47a74a8ec4fb6a1ef6d50099dd (diff) | |
download | skyhanni-2e93920ab64bacfc428cf8bf040a2b10b6d9f2f8.tar.gz skyhanni-2e93920ab64bacfc428cf8bf040a2b10b6d9f2f8.tar.bz2 skyhanni-2e93920ab64bacfc428cf8bf040a2b10b6d9f2f8.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index c2e8801ba..d1bb4dbda 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -28,6 +28,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getItemCategoryOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.isCoopSoulBound import at.hannibal2.skyhanni.utils.ItemUtils.isEnchanted +import at.hannibal2.skyhanni.utils.ItemUtils.isSoulBound import at.hannibal2.skyhanni.utils.ItemUtils.isVanilla import at.hannibal2.skyhanni.utils.KeyboardManager import at.hannibal2.skyhanni.utils.LorenzColor @@ -339,7 +340,7 @@ object HideNotClickableItems { // TODO make check if player is on private island - if (!ItemUtils.isSoulBound(stack)) return false + if (!stack.isSoulBound()) return false hideReason = "This item cannot be stored into a chest!" return true diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 1fb4c4554..67f2865eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -50,8 +50,7 @@ object ItemUtils { } // TODO change else janni is sad - fun isSoulBound(stack: ItemStack): Boolean = - stack.getLore().any { it == "§8§l* §8Soulbound §8§l*" } + fun ItemStack.isSoulBound(): Boolean = getLore().any { it == "§8§l* §8Soulbound §8§l*" } fun isRecombobulated(stack: ItemStack) = stack.isRecombobulated() |