Skip to content

Commit

Permalink
fix: IntelliJ IDEA back at it again breaking stuff by saying it's unused
Browse files Browse the repository at this point in the history
  • Loading branch information
DataM0del committed Dec 22, 2024
1 parent fb5deb3 commit 7edf663
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/main/kotlin/info/opensigma/bind/BindManager.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package info.opensigma.bind

import info.opensigma.OpenSigma
import info.opensigma.event.impl.KeyPressEvent
import meteordevelopment.orbit.EventHandler
import java.util.HashMap
import java.util.function.Supplier

Expand All @@ -15,5 +17,19 @@ class BindManager {
map[integer] = runnable
}

companion object
@Suppress("unused")
@EventHandler
private fun onKey(keyPressEvent: KeyPressEvent) {
if (keyPressEvent.keyAction != 0)
return
map.forEach { (key, value) ->
if (key.get() == keyPressEvent.key)
value.run()
}
}

companion object {
@Suppress("unused")
val instance = BindManager()
}
}

0 comments on commit 7edf663

Please sign in to comment.