aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt b/src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt
index fcf9dcb..9bdcc26 100644
--- a/src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt
+++ b/src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt
@@ -20,10 +20,10 @@ open class FirmamentEventBus<T : FirmamentEvent> {
private val toHandle: MutableList<Handler<T>> = CopyOnWriteArrayList()
fun subscribe(handle: (T) -> Unit) {
- subscribe(handle, false)
+ subscribe(false, handle)
}
- fun subscribe(handle: (T) -> Unit, receivesCancelled: Boolean) {
+ fun subscribe(receivesCancelled: Boolean, handle: (T) -> Unit) {
toHandle.add(Handler(handle, receivesCancelled))
}