mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
PluginManager: account for possible abstract main classes
idk why anyone does this, but it shouldn't cause a core crash ...
This commit is contained in:
@ -166,6 +166,14 @@ class PluginManager{
|
||||
)));
|
||||
return null;
|
||||
}
|
||||
$reflect = new \ReflectionClass($mainClass); //this shouldn't throw; we already checked that it exists
|
||||
if(!$reflect->isInstantiable()){
|
||||
$this->server->getLogger()->error($language->translate(KnownTranslationFactory::pocketmine_plugin_loadError(
|
||||
$description->getName(),
|
||||
KnownTranslationFactory::pocketmine_plugin_mainClassAbstract()
|
||||
)));
|
||||
return null;
|
||||
}
|
||||
|
||||
$permManager = PermissionManager::getInstance();
|
||||
foreach($description->getPermissions() as $permsGroup){
|
||||
|
Reference in New Issue
Block a user