From 4dec09c6d96567f69ca92199bc263a8fbd9cd166 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 23 May 2023 00:33:07 +0200 Subject: Added extra setting to allow/block clicks for the 'hide not clickable' feature --- .../java/at/hannibal2/skyhanni/config/features/Inventory.java | 8 +++++++- .../skyhanni/features/inventory/HideNotClickableItems.kt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java index c6085250f..0a357a8f3 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java @@ -15,11 +15,17 @@ public class Inventory { public boolean hideNotClickable = false; @Expose - @ConfigOption(name = "Not Clickable Items Enabled", desc = "Hide items that are not clickable in the current inventory: ah, bz, accessory bag, etc.") + @ConfigOption(name = "Enabled", desc = "Hide items that are not clickable in the current inventory: ah, bz, accessory bag, etc.") @ConfigEditorBoolean @ConfigAccordionId(id = 0) public boolean hideNotClickableItems = false; + @Expose + @ConfigOption(name = "Block Clicks", desc = "Block the clicks on these items.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean hideNotClickableItemsBlockClicks = true; + @Expose @ConfigOption( name = "Opacity", 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 1b53bbf0e..6b061d1bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -125,6 +125,7 @@ class HideNotClickableItems { @SubscribeEvent fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { if (isDisabled()) return + if (!SkyHanniMod.feature.inventory.hideNotClickableItemsBlockClicks) return if (event.gui !is GuiChest) return val chestName = InventoryUtils.openInventoryName() -- cgit