I'm trying to make 2 yml files: playerdata.yml: Code: Indexfire: Rank: Default gamedata.yml: Code: Indexfire: Phoenix: -1 -1 -1 Marksman: -1 -1 -1 Desolator: -1 -1 -1 But the tutorials do not help at all, how do I achieve this? I also want to read what they contain
Assuming both YAML files are in your plugin's data folder and are running the code from the PluginBase... PHP: $playerData = new Config($this->getDataFolder()."playerdata.yml", Config::YAML);$IndexfireData = $playerData->get("Indexfire", []);var_dump($IndexfireData);$gamedataData = new Config($this->getDataFolder()."gamedata.yml", Config::YAML);$gamedata = $gamedataData->getAll();var_dump($gamedata);