diff options
author | nea <nea@nea.moe> | 2023-09-04 20:22:51 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-09-04 20:22:51 +0200 |
commit | d202ef5439a180efecc27ab4695b1a12febb041f (patch) | |
tree | 959ac68db802d562dee2d92aecbb3741dbcce3b6 /src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt | |
parent | ee5591684dc6bcdea6c44a62806d537bbb7e0cee (diff) | |
download | firmament-d202ef5439a180efecc27ab4695b1a12febb041f.tar.gz firmament-d202ef5439a180efecc27ab4695b1a12febb041f.tar.bz2 firmament-d202ef5439a180efecc27ab4695b1a12febb041f.zip |
Make chat events use fabric events
[no changelog]
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/events/FirmamentEventBus.kt | 4 |
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)) } |