hello, i'm creating a plugin (mini game) and i want know how to teleport all player in the word with coordonné random
Don't know what you mean by coordonne random, but this: PHP: foreach($this->api->player->getAll($this->api->level->get("world")) as $p) $p->teleport(new Position($x,$y,$z,$level));
if we are 4 players. when my game start i went the 4 players are teleporting in different coordinate (X,Y,Z)
PHP: $players = array();//put the player objects in here$coords = array("0"=>array("x"=>x,"y"=>y,"z"=>z,"level"=>level),"1"=>array("x"=>x,"y"=>y,"z"=>z,"level"=>level));//keep addingforeach($players as $p){ $r = rand(0,count($coords)); $p->teleport(new Position($coords[$r]["x"],$coords[$r]["y"],$coords[$r]["z"],$this->api->level->get($coords[$r]["x"])));} something like this?