Object of class pocketmine\utils\Config could not be converted to string" Main.php PHP: $pconfig = new Config($this->getDataFolder()."players/".strtolower($event->getPlayer()->getName()).".yml", Config::YAML, array()); $player = $event->getPlayer(); foreach($this->$pconfig->get('farmer-lvl' or 'bucheron-lvl' or 'alchimiste-lvl' or 'miner-lvl') as $id => $array) { Config.yml PHP: 313: #id item damage: 0 need-lvl: 5 #level for unlock craft job: "bucheron-lvl" message: "§aYou can't craft this because you are not level 5" #set error message when your level is <"
aPlayer.yml PHP: ---miner-xp: 1bucheron-xp: 1alchimiste-xp: 1farmer-xp: 1bucheron-lvl: 1farmer-lvl: 1alchimiste-lvl: 1miner-lvl: 1... I want to make this config.yml: Code: --- 313: #id item damage: 0 need-lvl: 5 #level for unlock craft job: "bucheron-lvl" message: "§aYou can't craft this because you are not level 5" #set error message when your level is < ...