$playerlist = $this->getServer()->getOnlinePlayers(); $playerlist is NOT an array of player objects (not instanceof Player) How do I get $playerlist as an array of player objects OR how do I get an array of online player usernames
Are you sure? PHP: /** @var Player[] */private $playerList = [];/*** @return Player[]*/public function getOnlinePlayers(){ return $this->playerList;} https://github.com/PocketMine/Pocke...3a4f21e7e72b4e/src/pocketmine/Server.php#L658