From edaf937ebc2585577c88056f042f54dcd8dbc7b5 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Sat, 16 Jul 2022 00:17:56 +0200 Subject: add your equipment to hide not clickable items --- .../skyhanni/items/HideNotClickableItems.kt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni') 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 -- cgit