Here is code PHP: $Health = $this->GO["MaxHealth"]["$Players"]; and when I run it, It says [Server thread/CRITICAL]: ErrorException: "Undefined index: MaxHealth" (EXCEPTION) And I wrote this code in onEnable() PHP: $this->GOO = new Config ($this->getDataFolder()."GO.yml",Config::YAML); $this->GO = $this->GOO->getAll(); How can I solve this problem?
Is there only a way to write MaxHealth already in this? PHP: $this->GOO = new Config ($this->getDataFolder()."GO.yml",Config::YAML); $this->GO = $this->GOO->getAll(); If is right, how can I write already?
PHP: $this->GOO = (new Config($this->getDataFolder() . "GO.yml", Config::YAML, array( "Max-Health" => "yourvalue",)));$this->GO = $this->GOO->getAll(); Try this, i think it works, im ln mobile rn so idrk
or u can do PHP: $this->GOO = new Config($this->getDataFolder() . "GO.yml", Config::YAML);$this->GOO->set("Max-Health", 1); //u can change 1 to whatever int value you want$this->GO = $this->GOO->getAll();