I want to foreach all players and teleport them randomly each around the world, but their x and y has to be less then 5000 edit: there x and z has to be less than 5000
PHP: $x = mt_rand(0,5000);$z = mt_rand(0,5000);$y = 50;$player->teleport($x, $y, $z);//Or is it vector3?
Or is it not a vector3? Who knows? Spoiler if source was available and people could read it then it would be much better..... oh IT IS!
Given the information above, you only need to see this to answer your question about whether or not it needs a Vector3. As Intyre was trying to say, everything is in the source code(and in the API docs) that you will need regarding PM methods. Just learn to find them. Learning to find your own answers will benefit everyone.
other information is that player can teleport -5000 as well as +5000 blocks I would recommend setting the y coord to the highest non-air block at those x/z coords to make sure they don't suffocate