mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Fixed loading invalid plugins crashing the server
This commit is contained in:
@ -192,6 +192,7 @@ class PluginManager{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$file = $directory . $file;
|
$file = $directory . $file;
|
||||||
|
try{
|
||||||
$description = $loader->getPluginDescription($file);
|
$description = $loader->getPluginDescription($file);
|
||||||
if($description instanceof PluginDescription){
|
if($description instanceof PluginDescription){
|
||||||
$name = $description->getName();
|
$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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user