mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Merge branch 'stable'
This commit is contained in:
@@ -459,8 +459,16 @@ class PluginManager{
|
||||
continue;
|
||||
}
|
||||
|
||||
$eventClass = $parameters[0]->getClass();
|
||||
if($eventClass === null or !$eventClass->isSubclassOf(Event::class)){
|
||||
$paramType = $parameters[0]->getType();
|
||||
//isBuiltin() returns false for builtin classes ..................
|
||||
if($paramType instanceof \ReflectionNamedType && !$paramType->isBuiltin()){
|
||||
/** @phpstan-var class-string $paramClass */
|
||||
$paramClass = $paramType->getName();
|
||||
$eventClass = new \ReflectionClass($paramClass);
|
||||
if(!$eventClass->isSubclassOf(Event::class)){
|
||||
continue;
|
||||
}
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user