pocketmine\event\Event::isCancelled PHP Method

isCancelled() public method

public isCancelled ( ) : boolean
return boolean
    public function isCancelled()
    {
        if (!$this instanceof Cancellable) {
            throw new \BadMethodCallException("Event is not Cancellable");
        }
        /** @var Event $this */
        return $this->isCancelled === true;
    }

Usage Example

 /**
  * @param Event $event
  */
 public function callEvent(Event $event)
 {
     if ($event instanceof Cancellable and $event->isCancelled() and $this->isIgnoringCancelled()) {
         return;
     }
     $this->timings->startTiming();
     $this->executor->execute($this->listener, $event);
     $this->timings->stopTiming();
 }
All Usage Examples Of pocketmine\event\Event::isCancelled