Usage:
Use "/randomrespawn [distance]" to set a place to respawn with a random distance from 0, 0, 0 in the world called "world". Use "/randomrespawn off" to turn this off:
Permissions
You may be able to use a perm plugin to give permissions to use this with permissions random_respawn.randomrespawn. For now its meant to be set from the console or by a Operator player.
Plugin Logic
The logic of the plugin is to choose a random X/Z pair then find the first solid block going down from 256 that is not liquid or air. If it finds liquid or air it chooses another X/Z pair
.
Here is the code for your reference:
Want to see more?
If you wish to support me go to
https://warbycode.com/donate for any amount.