feat: added support for un-canceling within a same listener

This commit is contained in:
zaaarf 2023-08-23 13:06:33 +02:00
parent 1a762fb4da
commit b5338abcad
No known key found for this signature in database
GPG key ID: 6445A5CD15E5B40C

View file

@ -15,8 +15,17 @@ public interface IEventCancelable extends IEvent {
} }
/** /**
* Cancels the event. Any user-defined implementation will * Cancels the event.
* be ignored. * 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) {}
} }