diff --git a/src/pocketmine/plugin/PluginBase.php b/src/pocketmine/plugin/PluginBase.php index 122d17ca0..6127a1f5c 100644 --- a/src/pocketmine/plugin/PluginBase.php +++ b/src/pocketmine/plugin/PluginBase.php @@ -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)))); diff --git a/src/pocketmine/plugin/PluginManager.php b/src/pocketmine/plugin/PluginManager.php index 784e2c3cf..2aaee7181 100644 --- a/src/pocketmine/plugin/PluginManager.php +++ b/src/pocketmine/plugin/PluginManager.php @@ -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);