aromaa / WorldGuardExtraFlags

Extension for the WorldGuard plugin.
https://www.spigotmc.org/resources/worldguard-extra-flags.4823
MIT License
92 stars 73 forks source link

Glide flag not functioning properly #115

Closed jk526 closed 4 years ago

jk526 commented 4 years ago

Hi,

I've been using the plugin for quite some time and it's always been fine. Recently the glide flag has stopped functioning properly. When someone tries to glide in a region it will effect flight, but they can spam spacebar and still fly, it also allows them to jump 2 blocks high which ruins a few maps I have.

Is this something known or is there another explanation or fix I could try?

Thanks, JK

aromaa commented 4 years ago

This is a vanilla thing. This is similar to how flying/double jumps also works.

When you have elytra the client knows it can glide. So the client can start to glide at any moment it thinks its possible (the player is in the air) and has no knowledge of regions. So when you start to glide it thinks its fine because in vanilla there's no regions preventing you to glide so it tells the server "Hey, I'm gliding!".

Because of latency this message takes some time to arrive to the server and as soon as it does the server checks that hey, they are in a region that says gliding is not allowed! And sends the client message "Hey, stop gliding!" and this message also takes some time to arrive at the client.

When the client receives the message that it needs to stop gliding it does so. But nothing is stopping him to start gliding again so the process goes on.