PHP: foreach ($this->getServer()->getOnlinePlayers() as $O){ $this->DA["GAM"][] = $O->getName(); and when I see the file of plugin data, it has only one people. like --- GAM : Steve ...
I might guess, that you're not correctly loading the saved data, so in other words, you are re-writing the data not appending to it. Could you please show the code which is responsible for loading and saving the data. Also please try using hard coded values like this: PHP: foreach(["Steve", "Alex", "Notch", "Shoghicp"] as $player) { $this->data["someKey"][] = $player;} P.S. stop naming the variables so vague. Code is meant for people to read, you're making hard on yourself and others.
okay, and this was my code Code: foreach ($this->getServer()->getOnlinePlayers() as $O){ $this->DA["GAM"][] = $O->getName(); $this->DADA->setAll($this->DA); $this->DADA->save(); }
PHP: // will append to current loaded data.$this->DADA->setAll(array_merge($this->DATA->getAll(), $this->DA));