You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
231 B
Kotlin
8 lines
231 B
Kotlin
4 years ago
|
package me.eater.threedom.event
|
||
|
|
||
|
interface EventListener {
|
||
|
fun <T> on(eventName: String, block: (Event<T>) -> Unit)
|
||
|
}
|
||
|
|
||
|
inline fun <reified T> EventListener.on(noinline block: (Event<T>) -> Unit) = on(T::class.java.name, block)
|