summaryrefslogtreecommitdiff
path: root/src/main/kotlin/event/UltraEvent.kt
blob: 42fa4f227fd51a3971d9af61ca3850322481a34c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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)
	}

}