Hi, I was wanting to know how I could achieve this where I want to broadcast every players name that are online except specific player defined by players name. e.g. steve. so I would do foreach $this->getServer->getOnlinePlayers as $p then $players = $p->getName(); I could then broadcast this $players to show all online player names but how could I make it so it broadcasts every name except the player name steve?
Please learn PHP. Seriously. Do you know what an array is? If not I recommend to start from http://php.net/manual/en/language.types.array.php. Just because others will do it anyways: code, but please don't just copy+paste PHP: foreach($this->getServer->getOnlinePlayers as $player){ #iterate through all objects in array if($player->getName() !== "Steve"){ #check if $player doesn't have the name Steve #send message to $player }}