aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/events/WorldKeyboardEvent.kt
blob: 860db5c96e2be8d61338c4dabc0dae8f9470b171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package moe.nea.firmament.events

import moe.nea.firmament.keybindings.GenericInputAction
import moe.nea.firmament.keybindings.InputModifiers
import moe.nea.firmament.keybindings.SavedKeyBinding

data class WorldKeyboardEvent(val action: GenericInputAction, val modifiers: InputModifiers) : FirmamentEvent.Cancellable() {
	fun matches(keyBinding: SavedKeyBinding, atLeast: Boolean = false): Boolean {
		return keyBinding.matches(action, modifiers, atLeast)
	}

	companion object : FirmamentEventBus<WorldKeyboardEvent>()
}