Is there any vanilla random spawn plugin that teleports players to random locations when they join for the first time, and teleports them to random locations when they die and they don't have a bed?
When you join a world, you Teleport to a random location and start surviving. I want the same consent, but each player should be teleported in different places
hey i can probally code u a plugin that teleports a player to a random location everytime they join dont know about Their First time only though but i could do death.
Just use setSpawn after you teleported them: https://github.com/pmmp/PocketMine-...dabb19927b483/src/pocketmine/Player.php#L1223
hey heres the github repository link to the plugin tell me if i have to change anything! https://github.com/Jviguy/TeleportRandomOnJoin/tree/master
I think it'd be better if you could define the area in a config file instead of hardcoding it. Also using $level->getSafeSpawn($position) would frustrate players less than having them fall from the sky or spawn inside the ground when joining for the first time because you randomise the y position. And why are you changing the join message? That's outside the scope of the plugin (see also: https://en.m.wikipedia.org/wiki/Principle_of_least_astonishment) Otherwise it's great, thanks!
Small problem Cant Use a config because RandFunction Needs the parameters to be a integer and i dont know how to make a variable to a integer im just a beginner at php so i dont know lol.
hey i updated code the code now uses a faster function for randomizing attempted a config didn't work out and made the code put you closer to the ground atleast 3 blocks high to 1 in my tests.