How do you create player information files? Like how MassiveEcomony makes a .yml file for every one of the players that join. How do you do that? Furthermore, it would be nice if someone can tell me how to pull statuses from these .yml ? Like the command $this->getConfig()->get("##value##"); but with the player .yml ?
PHP: function create(\pocketmine\Player $player){$cnf = New Config($player->getName . ".yml", Config::YAML,["Money" => $money...]}function get(\pocketmine\Player $player){return new Config($player->getName() . ".yml", Config::YAML);}
First make the directory where you want to save player data PHP: @mkdir($this->getDataFolder() . "/users"); Then create the player configuration file and save the data you want: PHP: $this->player_cfg = new Config($this->getDataFolder() . "/users" . strtolower($player->getName()), Config::YAML);//Set your own data$this->player_cfg->set("whatyouwant", "value");$this->player_cfg->save(); To get values use normally $yourconfig->get(); function That's all