/**
  * @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();
 }
 /**
  * @param string        $event Class name that extends Event
  * @param Listener      $listener
  * @param int           $priority
  * @param EventExecutor $executor
  * @param Plugin        $plugin
  * @param bool          $ignoreCancelled
  *
  * @throws PluginException
  */
 public function registerEvent($event, Listener $listener, $priority, EventExecutor $executor, Plugin $plugin, $ignoreCancelled = false)
 {
     if (!is_subclass_of($event, Event::class) or (new \ReflectionClass($event))->isAbstract()) {
         throw new PluginException($event . " is not a valid Event");
     }
     if (!$plugin->isEnabled()) {
         throw new PluginException("Plugin attempted to register " . $event . " while not enabled");
     }
     $timings = new TimingsHandler("Plugin: " . $plugin->getDescription()->getFullName() . " Event: " . get_class($listener) . "::" . ($executor instanceof MethodEventExecutor ? $executor->getMethod() : "???") . "(" . (new \ReflectionClass($event))->getShortName() . ")", self::$pluginParentTimer);
     $this->getEventListeners($event)->register(new RegisteredListener($listener, $executor, $priority, $plugin, $ignoreCancelled, $timings));
 }