mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Listener: Drop support for @softDepend annotation
literally nobody uses this. I don't think anyone even knows it exists. It's also an obstacle to separating event handler registration from PluginManager.
This commit is contained in:
@ -433,22 +433,13 @@ class PluginManager{
|
||||
continue;
|
||||
}
|
||||
|
||||
$handlerClosure = $method->getClosure($listener);
|
||||
|
||||
try{
|
||||
$eventClass = $parameters[0]->getClass();
|
||||
}catch(\ReflectionException $e){ //class doesn't exist
|
||||
if(isset($tags["softDepend"]) && !isset($this->plugins[$tags["softDepend"]])){
|
||||
$this->server->getLogger()->debug("Not registering @softDepend listener " . Utils::getNiceClosureName($handlerClosure) . "() because plugin \"" . $tags["softDepend"] . "\" not found");
|
||||
continue;
|
||||
}
|
||||
|
||||
throw $e;
|
||||
}
|
||||
$eventClass = $parameters[0]->getClass();
|
||||
if($eventClass === null or !$eventClass->isSubclassOf(Event::class)){
|
||||
continue;
|
||||
}
|
||||
|
||||
$handlerClosure = $method->getClosure($listener);
|
||||
|
||||
try{
|
||||
$priority = isset($tags["priority"]) ? EventPriority::fromString($tags["priority"]) : EventPriority::NORMAL;
|
||||
}catch(\InvalidArgumentException $e){
|
||||
|
Reference in New Issue
Block a user