Merge branch 'minor-next' into major-next

This commit is contained in:
Dylan K. Taylor
2023-04-05 20:14:59 +01:00
9 changed files with 69 additions and 49 deletions

View File

@ -63,10 +63,7 @@ use function realpath;
use function shuffle;
use function sprintf;
use function str_contains;
use function str_starts_with;
use function strlen;
use function strtolower;
use function substr;
/**
* Manages all the plugins
@ -654,11 +651,6 @@ class PluginManager{
throw new PluginException("Plugin attempted to register event handler " . $handlerName . "() to event " . $event . " while not enabled");
}
$prefix = $plugin->getDescription()->getSrcNamespacePrefix();
if(str_starts_with($handlerName, $prefix) && $prefix !== ""){
$handlerName = substr($handlerName, strlen($prefix) + 1);
}
$timings = new TimingsHandler($handlerName . "(" . (new \ReflectionClass($event))->getShortName() . ")", group: $plugin->getDescription()->getFullName());
$registeredListener = new RegisteredListener($handler, $priority, $plugin, $handleCancelled, $timings);