Merge branch 'release/3.2'

This commit is contained in:
Dylan K. Taylor 2018-07-21 15:57:56 +01:00
commit dc29b4dc3f
2 changed files with 4 additions and 3 deletions

View File

@ -267,9 +267,7 @@ abstract class PluginBase implements Plugin{
}
public function reloadConfig(){
if(!$this->saveDefaultConfig()){
@mkdir($this->dataFolder);
}
$this->saveDefaultConfig();
$this->config = new Config($this->configFile);
if(($configStream = $this->getResource("config.yml")) !== null){
$this->config->setDefaults(yaml_parse(Config::fixYAMLIndexes(stream_get_contents($configStream))));

View File

@ -181,6 +181,9 @@ class PluginManager{
$this->server->getLogger()->error("Projected dataFolder '" . $dataFolder . "' for " . $description->getName() . " exists and is not a directory");
return null;
}
if(!file_exists($dataFolder)){
mkdir($dataFolder, 0777, true);
}
$prefixed = $loader->getAccessProtocol() . $path;
$loader->loadPlugin($prefixed);