diff --git a/src/ChestShop/Main.php b/src/ChestShop/Main.php index e6ae486..3a662d4 100644 --- a/src/ChestShop/Main.php +++ b/src/ChestShop/Main.php @@ -160,10 +160,8 @@ public function onDisable() : void{ */ private function updateConfig(string $config) : void{ if(isset(self::CONFIG[$config])){ - $data = []; - if(is_file($path = $this->getDataFolder().$config)){ - $data = yaml_parse_file($path); - } + $path = $this->getDataFolder().$config; + $data = is_file($path) ? yaml_parse_file($path) : self::CONFIG[$config]; foreach(self::CONFIG[$config] as $key => $value){ if(!isset($data[$key])){ $data[$key] = $value;