aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/events')
-rw-r--r--src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt b/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt
index 09027ed..c7c8ea6 100644
--- a/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt
+++ b/src/main/kotlin/com/dulkirfabric/events/base/CancellableEvent.kt
@@ -4,8 +4,7 @@ import com.dulkirfabric.DulkirModFabric
import meteordevelopment.orbit.ICancellable
abstract class CancellableEvent: ICancellable {
- @JvmField
- var cancelled: Boolean = false
+ private var cancelled = false
override fun isCancelled(): Boolean {
return cancelled
@@ -19,7 +18,6 @@ abstract class CancellableEvent: ICancellable {
* Posts a given event to the bus and returns whether the user wishes to cancel it
*/
fun post(): Boolean {
- DulkirModFabric.EVENT_BUS.post(this)
- return cancelled
+ return DulkirModFabric.EVENT_BUS.post(this).isCancelled
}
} \ No newline at end of file