diff --git a/src/event/Cancellable.php b/src/event/Cancellable.php index 023549023..e01d0b52d 100644 --- a/src/event/Cancellable.php +++ b/src/event/Cancellable.php @@ -24,10 +24,18 @@ declare(strict_types=1); namespace pocketmine\event; /** - * Events that can be cancelled must use the interface Cancellable + * This interface is implemented by an Event subclass if and only if it can be cancelled. + * + * The cancellation of an event directly affects whether downstream event handlers + * without `@handleCancelled` will be called with this event. + * Implementations may provide a direct setter for cancellation (typically by using `CancellableTrait`) + * or implement an alternative logic (such as a function on another data field) for `isCancelled()`. */ interface Cancellable{ + /** + * Returns whether this instance of the event is currently cancelled. + * + * If it is cancelled, only downstream handlers that declare `@handleCancelled` will be called with this event. + */ public function isCancelled() : bool; - - public function setCancelled(bool $value = true) : void; }