aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-18 16:07:09 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-18 16:07:09 +0200
commitac14bdff24f7ac437c71ac358d842250c092017d (patch)
tree28aff6b2170301e7c99f910c43dfe55b0f67c270 /src/main/java/at/hannibal2/skyhanni/features
parentbab0f971199935f325d14dc65de22eed635dc12b (diff)
downloadskyhanni-ac14bdff24f7ac437c71ac358d842250c092017d.tar.gz
skyhanni-ac14bdff24f7ac437c71ac358d842250c092017d.tar.bz2
skyhanni-ac14bdff24f7ac437c71ac358d842250c092017d.zip
Hopefully fixed garden hotkeys staying toggled when logging off with farming tool in hand
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt7
1 files changed, 5 insertions, 2 deletions
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 73a336eaa..e5338cebc 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
@@ -99,8 +99,11 @@ class GardenCustomKeybinds {
}
private fun KeyBinding.unpressKeyIfDown() {
- if (KeybindHelper.isKeyDown(keyCode)) {
- (this as AccessorKeyBinding).skyhanni_unpressKey()
+ try {
+ if (KeybindHelper.isKeyDown(keyCode)) {
+ (this as AccessorKeyBinding).skyhanni_unpressKey()
+ }
+ } catch (_: IllegalStateException) {
}
}