help me I want it to show a list that is online. foreach($this->getServer()->getOnlinePlayers() as $player){ $this->playerList[strtolower($player->getName())] = $player; $list = $player->getName(); } $form->addDropdown("§aรายชื่อ§l§e ➤§r", [$list]);
PHP: $players = []; $players[] = " "; foreach ($this->plugin->getServer()->getOnlinePlayers() as $player){ $players[] = $player->getName(); } $form->addDropdown("",$players);