diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java index 80bfcf3a7..e2e695103 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/KeyBindConfig.java @@ -16,6 +16,12 @@ public class KeyBindConfig { @FeatureToggle public boolean enabled = false; + @Expose + @ConfigOption(name = "Exclude Barn", desc = "Disable this feature while on the barn plot.") + @ConfigEditorBoolean + @FeatureToggle + public boolean excludeBarn = false; + @ConfigOption(name = "Disable All", desc = "Disable all keys.") @ConfigEditorButton(buttonText = "Disable") public Runnable presetDisable = () -> { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt index b696d05ba..f4a401cd5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt @@ -36,7 +36,7 @@ object GardenCustomKeybinds { map[mcSettings.keyBindSneak] = { config.sneak } } - private fun isEnabled() = GardenAPI.inGarden() && config.enabled + private fun isEnabled() = GardenAPI.inGarden() && config.enabled && !(GardenAPI.onBarnPlot && config.excludeBarn) private fun isActive(): Boolean { if (!isEnabled()) return false |