So I have an array setup sorta like this: PHP: foreach($this->plugin->getServer()->getOnlinePlayers() as $p){ $this->plugin->array["players"] = $p->getName();} How would I, for example, get a player named Joe from $array["players"], I want to check if his name is in the "players" part. And how would I unset only 'Joe'? I hope I explained well enough.
PHP: if(in_array('Joe', $array['players'])){ // Check if Joe is exist $search = array_search('Joe', $array['players']); // Get the key of Joe unset($array['players'][$search]); // Unset the value of that key} I think it's something like this. Sorry if i had some mistakes