mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 10:31:51 +00:00
Fixed loading invalid plugins crashing the server
This commit is contained in:
parent
487ce00542
commit
25f5d409f1
@ -192,6 +192,7 @@ class PluginManager{
|
||||
continue;
|
||||
}
|
||||
$file = $directory . $file;
|
||||
try{
|
||||
$description = $loader->getPluginDescription($file);
|
||||
if($description instanceof PluginDescription){
|
||||
$name = $description->getName();
|
||||
@ -244,6 +245,9 @@ class PluginManager{
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch(\Exception $e){
|
||||
$this->server->getLogger()->error("Could not load '". $file ."' in folder '".$directory."': ".$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user