summaryrefslogtreecommitdiff
path: root/src/main/kotlin/event/UltraNotifierEvents.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/event/UltraNotifierEvents.kt')
-rw-r--r--src/main/kotlin/event/UltraNotifierEvents.kt20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/kotlin/event/UltraNotifierEvents.kt b/src/main/kotlin/event/UltraNotifierEvents.kt
new file mode 100644
index 0000000..8c8fb13
--- /dev/null
+++ b/src/main/kotlin/event/UltraNotifierEvents.kt
@@ -0,0 +1,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
+ }
+}
+
+