aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-08-23 13:06:33 +0200
committer zaaarf <zaaarf@proton.me>2023-08-23 13:06:33 +0200
commitb5338abcad358406a18c6d03121c5cd4d18c45c6 (patch)
treea5436666b2110b72888bd5d471239040c6277375 /src/main/java/ftbsc
parent1a762fb4da7acfab94e5271706efcf3831c0832d (diff)
feat: added support for un-canceling within a same listener
Diffstat (limited to 'src/main/java/ftbsc')
-rw-r--r--src/main/java/ftbsc/geb/api/IEventCancelable.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/ftbsc/geb/api/IEventCancelable.java b/src/main/java/ftbsc/geb/api/IEventCancelable.java
index 32669f2..c6630a1 100644
--- a/src/main/java/ftbsc/geb/api/IEventCancelable.java
+++ b/src/main/java/ftbsc/geb/api/IEventCancelable.java
@@ -15,8 +15,17 @@ public interface IEventCancelable extends IEvent {
}
/**
- * Cancels the event. Any user-defined implementation will
- * be ignored.
+ * Cancels the event.
+ * Any user-defined implementation will be ignored.
*/
- default void setCanceled() {}
+ default void setCanceled() {
+ this.setCanceled(true);
+ }
+
+ /**
+ * Cancels the event.
+ * Any user-defined implementation will be ignored.
+ * @param canceled whether the event should be set to canceled
+ */
+ default void setCanceled(boolean canceled) {}
}