diff options
Diffstat (limited to 'src/main/kotlin/events/subscription')
-rw-r--r-- | src/main/kotlin/events/subscription/Subscription.kt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/kotlin/events/subscription/Subscription.kt b/src/main/kotlin/events/subscription/Subscription.kt new file mode 100644 index 0000000..83b91c9 --- /dev/null +++ b/src/main/kotlin/events/subscription/Subscription.kt @@ -0,0 +1,16 @@ + +package moe.nea.firmament.events.subscription + +import moe.nea.firmament.events.FirmamentEvent +import moe.nea.firmament.events.FirmamentEventBus +import moe.nea.firmament.features.FirmamentFeature + +interface SubscriptionOwner { + val delegateFeature: FirmamentFeature +} + +data class Subscription<T : FirmamentEvent>( + val owner: Any, + val invoke: (T) -> Unit, + val eventBus: FirmamentEventBus<T>, +) |