aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/events/subscription/Subscription.kt
blob: 1c1d3bd2a133efae40e4afec924e301f7d82e663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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>,
    val methodName: String,
)