diff options
author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-16 00:17:56 +0200 |
---|---|---|
committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-16 00:17:56 +0200 |
commit | edaf937ebc2585577c88056f042f54dcd8dbc7b5 (patch) | |
tree | 9863ee1826a604a92375f075dab410792c5324a2 /src/main/java/at/hannibal2/skyhanni | |
parent | 55f2fdb3e411ce021b75a4ed4da1f9287f1dd843 (diff) | |
download | skyhanni-edaf937ebc2585577c88056f042f54dcd8dbc7b5.tar.gz skyhanni-edaf937ebc2585577c88056f042f54dcd8dbc7b5.tar.bz2 skyhanni-edaf937ebc2585577c88056f042f54dcd8dbc7b5.zip |
add your equipment to hide not clickable items
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-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 |