diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-09-26 19:06:00 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 11:06:00 +0200 |
commit | 16121c35b05073144a208f786e4f006497df50bb (patch) | |
tree | 45d44d0018858d916966e9c1bb604d8841bd92e2 /src | |
parent | f755b02173fa3f5b3374b1629be4bea35df3452a (diff) | |
download | skyhanni-16121c35b05073144a208f786e4f006497df50bb.tar.gz skyhanni-16121c35b05073144a208f786e4f006497df50bb.tar.bz2 skyhanni-16121c35b05073144a208f786e4f006497df50bb.zip |
Hide not clickable items bypass key #504
Adds the ability to bypass not clickable items when holding the control key.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java | 8 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java index 42fabffea..ff2f95a8f 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/InventoryConfig.java @@ -42,7 +42,13 @@ public class InventoryConfig { public int hideNotClickableOpacity = 180; @Expose - @ConfigOption(name = "Green line", desc = "Adds green line around items that are clickable.") + @ConfigOption(name = "Bypass With Control", desc = "Adds the ability to bypass not clickable items when holding the control key.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean notClickableItemsBypass = true; + + @Expose + @ConfigOption(name = "Green Line", desc = "Adds green line around items that are clickable.") @ConfigEditorBoolean @ConfigAccordionId(id = 0) public boolean hideNotClickableItemsGreenLine = true; 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 d0e51d176..e28ebee04 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -81,6 +81,7 @@ class HideNotClickableItems { fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) { if (!LorenzUtils.inSkyBlock) return if (isDisabled()) return + if (SkyHanniMod.feature.inventory.notClickableItemsBypass && LorenzUtils.isControlKeyDown()) return if (event.gui !is GuiChest) return val guiChest = event.gui val chest = guiChest.inventorySlots as ContainerChest @@ -134,6 +135,7 @@ class HideNotClickableItems { fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { if (isDisabled()) return if (!SkyHanniMod.feature.inventory.hideNotClickableItemsBlockClicks) return + if (SkyHanniMod.feature.inventory.notClickableItemsBypass && LorenzUtils.isControlKeyDown()) return if (event.gui !is GuiChest) return val chestName = InventoryUtils.openInventoryName() |