Hello what my question is that I want the player who clicks the compass get a dropdown and show the players in the world he is. Anyone know how? Here is my code. PHP: public function locatePlayer($sender){ $list = []; foreach($this->getServer->getOnlinePlayers as $p){ $list[] = $p->getNameTag(); } $this->playerList[$player->getNameTag()] = $list; $api = $this->getServer()->getPluginManager()->getPlugin("FormAPI"); $form = $api->createCustomForm(function(Player $player, array $data = null){ if($data === null){ return true; } $index = $data[1]; $playerName = $this->playerList[$player->getNameTag()][$index]; $z = $this->getServer()->getPlayer($playerName)->getZ(); $x = $this->getServer()->getPlayer($playerName)->getX(); $y = $this->getServer()->getPlayer($playerName)->getY(); $player->sendMessage("§9Player:§b {$playerName->getName()} §9-- Loaction: $x, $y, $z"); }); $form->setTitle("§7Find Player Here"); $form->setLabel("§3Get Players here. Players are track in the world you are in."); $form->addDropdown("Select a player", $this->playerList[$player->getNameTag()]); $form->sendToPlayer($player); return $form; }