diff options
| author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-16 00:17:56 +0200 |
|---|---|---|
| committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-16 00:17:56 +0200 |
| commit | 2c15e17673faf5cf9fbc1279d6d805983cf9e52c (patch) | |
| tree | 9863ee1826a604a92375f075dab410792c5324a2 | |
| parent | 667d14c8fdbe9309193ddf4e5460a20c6daf5dad (diff) | |
| download | SkyHanni-2c15e17673faf5cf9fbc1279d6d805983cf9e52c.tar.gz SkyHanni-2c15e17673faf5cf9fbc1279d6d805983cf9e52c.tar.bz2 SkyHanni-2c15e17673faf5cf9fbc1279d6d805983cf9e52c.zip | |
add your equipment to hide not clickable items
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt index 500133a53..0d1c0e03f 100644 --- a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt @@ -180,10 +180,39 @@ class HideNotClickableItems { hidePotionBag(chestName, stack) -> true hidePrivateIslandChest(chestName, stack) -> true hideAttributeFusion(chestName, stack) -> true + hideYourEquipment(chestName, stack) -> true else -> false } } + private fun hideYourEquipment(chestName: String, stack: ItemStack): Boolean { + if (!chestName.startsWith("Your Equipment")) return false + + val list = listOf( + "HELMET", + "CHESTPLATE", + "LEGGINGS", + "BOOTS", + "NECKLACE", + "CLOAK", + "BELT", + "GLOVES" + ) + for (type in list) { + if (stack.getLore().any { it.contains("§l") && it.contains(type) }) { + return false + } + } + + if (isSkyBlockMenuItem(stack.cleanName())) { + hideReason = "The SkyBlock Menu cannot be put into the potion bag!" + return true + } + + hideReason = "This item cannot be put into your equipment!" + return true + } + private fun hideAttributeFusion(chestName: String, stack: ItemStack): Boolean { if (!chestName.startsWith("Attribute Fusion")) return false |
