diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt | 2 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt index c6b0a7f..4683fac 100644 --- a/src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt +++ b/src/main/kotlin/moe/nea/firmament/events/ScreenChangeEvent.kt @@ -1,5 +1,6 @@ /* * SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe> + * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe> * * SPDX-License-Identifier: GPL-3.0-or-later */ @@ -9,5 +10,6 @@ package moe.nea.firmament.events import net.minecraft.client.gui.screen.Screen data class ScreenChangeEvent(val old: Screen?, val new: Screen?) : FirmamentEvent.Cancellable() { + var overrideScreen: Screen? = null companion object : FirmamentEventBus<ScreenChangeEvent>() } diff --git a/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt b/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt index a4542e7..bf29543 100644 --- a/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt +++ b/src/main/kotlin/moe/nea/firmament/events/subscription/Subscription.kt @@ -15,7 +15,7 @@ interface SubscriptionOwner { } data class Subscription<T : FirmamentEvent>( - val owner: SubscriptionOwner, + val owner: Any, val invoke: (T) -> Unit, val eventBus: FirmamentEventBus<T>, ) |