Skip to content

Commit 6aea738

Browse files
committed
Simplify Keyboard and Mouse Event listener
1 parent 99a3940 commit 6aea738

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/kotlin/com/lambda/module/modules/movement/BetterFirework.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ object BetterFirework : Module(
9999
}
100100
}
101101
listen<MouseEvent.Click> {
102-
if (!activateButton.isMouseBind || activateButton.mouse == mc.options.pickItemKey.boundKey.code) {
103-
return@listen
104-
}
105102
if (it.isPressed && it.satisfies(activateButton)) {
103+
if (activateButton.mouse == mc.options.pickItemKey.boundKey.code) {
104+
return@listen
105+
}
106106
runSafe {
107107
if (takeoffState != TakeoffState.None) {
108108
return@listen // Prevent using multiple times
@@ -117,10 +117,10 @@ object BetterFirework : Module(
117117
}
118118
}
119119
listen<KeyboardEvent.Press> {
120-
if (!activateButton.isKeyBind || activateButton.key == mc.options.pickItemKey.boundKey.code) {
121-
return@listen
122-
}
123120
if (it.isPressed && it.satisfies(activateButton)) {
121+
if (activateButton.key == mc.options.pickItemKey.boundKey.code) {
122+
return@listen
123+
}
124124
runSafe {
125125
if (takeoffState != TakeoffState.None) {
126126
return@listen // Prevent using multiple times

0 commit comments

Comments
 (0)