
One Way Glider
Set a spawn where every player will receive a one way glider with which he can fly until touching the ground outside of the spawn island.
One Way Glider
Description
With this mod/datapack you can place a marker at the middle of your spawn island and every player in the defined radius of the spawn island will receive a one way glider. Players with no chestplate equipped receive an equipped barrier block that serves as a glider (not an elytra so that they don't get the advancement). When a player has a chestplate equipped (or the player equips a chestplate in the spawn radius), the chestplate will become an unbreakable glider to. When a player has an elytra equipped, nothing happens.
As soon as the player touches the ground while not being in the spawn radius, the one way glider or the unbreakable glider attributes get removed.
Setup
To set this up, you only have to run the command
/function spawn:set
in the middle of your spawn island. The default spawn island radius is 20 blocks, if you want to have it bigger/smaller, you have to edit the 3 distance values in the function
data -> glider.control -> function -> give.mcfunction
and the 2 distance values in the function
data -> glider.control -> function -> removeOnGround.mcfunction
Anti exploit
The barrier glider will always get removed when in any inventory slot except the chestplate slot and if it is dropped. As soon as the player touches the ground, the barrier will also get removed from the chestplate slot. The same thing applies to the unbreakable and glider attributes. That way, this feature should not be exploitable.
