how to save the player kill status to config Loader: PHP: $kills = new Config($this->getDataFolder()."kills.yml", Config::YAML); SWArena: PHP: public function getKills($name){ return $this->kills[$name]; $this->kills->save(); } public function addKills($name){ $this->kills[$name] += 1; } public function getLastHit($name){ $time = time(); if(isset($this->lastHit[$name])){ $data = $this->lastHit[$name]; if(($time - $data['time']) >= 8){ return false; } return $data['damager']; } return false; } SWListener: PHP: $arena->addKills($arena->getLastHit($player->getName()));
(if $config is your Config object and $this->kills is just an array as used by the code you provided) PHP: $config->set("kills", $this->kills);$config->save(); // saves the data to the file To retrieve the data: PHP: $this->kills = $config->get("kills");