blob: 8c8fb134545f27b68fd6ba3426dacdf06a6a1657 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package moe.nea.ultranotifier.event
import moe.nea.ultranotifier.UltraNotifier
object UltraNotifierEvents {
val eventBus =
//#if FORGE
//$$ net.minecraftforge.common.MinecraftForge.EVENT_BUS
//#else
me.bush.eventbus.bus.EventBus { UltraNotifier.logger.warn("EventBus: $it") }
//#endif
@JvmStatic
fun <T : UltraEvent> post(event: T): T {
UltraNotifier.logger.info("Posting $event")
eventBus.post(event)
return event
}
}
|