summaryrefslogtreecommitdiff
path: root/src/main/kotlin/event/UltraEvent.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-05-21 22:02:50 +0200
committerLinnea Gräf <nea@nea.moe>2024-05-21 22:02:50 +0200
commitb681f11ea5a72d4ec6a34c2807f6ed781bbd19bc (patch)
tree382b21563a3ee58b0a2f7445be7ccfb484b73c4b /src/main/kotlin/event/UltraEvent.kt
parent123bc861062fe28a41d2abd8f5cea50866b8374c (diff)
downloadultra-notifier-b681f11ea5a72d4ec6a34c2807f6ed781bbd19bc.tar.gz
ultra-notifier-b681f11ea5a72d4ec6a34c2807f6ed781bbd19bc.tar.bz2
ultra-notifier-b681f11ea5a72d4ec6a34c2807f6ed781bbd19bc.zip
Add subscriber annotation
Diffstat (limited to 'src/main/kotlin/event/UltraEvent.kt')
-rw-r--r--src/main/kotlin/event/UltraEvent.kt37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/main/kotlin/event/UltraEvent.kt b/src/main/kotlin/event/UltraEvent.kt
new file mode 100644
index 0000000..42fa4f2
--- /dev/null
+++ b/src/main/kotlin/event/UltraEvent.kt
@@ -0,0 +1,37 @@
+package moe.nea.ultranotifier.event
+
+abstract class UltraEvent :
+//#if FORGE
+//$$ net.minecraftforge.eventbus.api.Event()
+//#else
+ me.bush.eventbus.event.Event()
+//#endif
+{
+//#if FORGE
+//$$ override fun isCancelable(): Boolean {
+//$$ return this.isCancellable()
+//$$ }
+//$$ fun isCancelled(): Boolean {
+//$$ return isCanceled()
+//$$ }
+//$$ fun setCancelled(value: Boolean) {
+//$$ setCanceled(value)
+//$$ }
+//#else
+ override
+//#endif
+
+ fun isCancellable(): Boolean {
+ return true
+ }
+
+//#if FORGE == 0
+ override
+//#endif
+ fun cancel() {
+ setCancelled(true)
+ }
+
+}
+
+