I tried this: PHP: $d = $this->plugin->stats->get($name)["deaths"]; var_dump($d); $d1 = $d + 1; $this->plugin->stats->set($name["deaths"], $d1); But there is an error on the last line. How would I properly set it?
I do this: PHP: public function onEnable(){$this->players = (new Config($this->getDataFolder()."players.yml", Config::YAML))->getAll(); // Load config in array}public function onDisable(){$this->players = new Config($this->getDataFolder()."players.yml", Config::YAML) // Save array in config.}public function addDeath($player){$name = ($player instanceof Player ? $player->getName() : $player);if(isset($this->players[$name]['deaths'])){$this->players[$name]['deaths']++;return true;}return false}