I want to program a plugin that works like in the current Craft Attack. I'm pretty sure it works differently in the original plugin, but I imagined it to be the following.
When the player enters a certain area, the plugin should give a permission that allows the player to glide (like an Elytra only without an elytra. I know there's a glideevent.). If the player is outside this area and there's not the "air" block below him, he gets the permission away and logically can no longer slide.
I already know how to check out when the player enters a certain area. But the problem is how do I give permission to the players who are in this area and take them away again?
Thanks for the answer! (Minecraft version 1.16)
I would install a permission system in your place and give the player permission with the API of this plugin. E.g. PermissionsEx.
You can find the documentation for the API on the Internet.
But I hardly believe that there's a command in this API that only gives permission to players who are in the circle. If there's such a command please let me know then everything would be clarified.
What do you even need the permission for?
In general, let the player slide as soon as you want it?
Maybe I get it wrong, but just ask if the player is in the area and then give him permission with the API. (PermissionsEx.getPlayer (player) .addPermission (""); → This is how it should work.
If that works, that would be great
I'll see if that works. But thanks for the good tip!
So I would like that the player can no longer guide outside the area. Unless it comes directly from the area and is in the air and flies (glides). While it is suspended in the air, it can still slide until it hits the ground.