aromaa / WorldGuardExtraFlags

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

A bug related to the Glide flag was fixed. #246

Open DeadSilenceIV opened 1 year ago

DeadSilenceIV commented 1 year ago

Hello, this commit prevents players from being stuck in the air when spamming the spacebar while the glide flag is being denied in a region. This also helps with a bug related to Geyser and bedrock players (Click here to take a look).

aromaa commented 1 year ago

This allows passing through blocks. I don't really like the idea of teleporting the player around, especially with the unknown flag.

DeadSilenceIV commented 1 year ago

This will only teleport the player 1 block below and only when there is AIR. We could remove/modify the teleport cause if you want.

aromaa commented 1 year ago

You would also need to take account when the player is standing on slabs etc.

aromaa commented 1 year ago

I should also add that this allows going thru entities with collision box like boats.

DeadSilenceIV commented 1 year ago

Well.., as far as i know boats don't float on air. Here is a quick test i did. https://youtu.be/JUqMPJ_AJfg

aromaa commented 1 year ago

You should use bottom slab, not top one. For boats, you can stack them or make them float above air by using blocks. You could for example cover a hole with a boat

DeadSilenceIV commented 1 year ago

You should use bottom slab, not top one. For boats, you can stack them or make them float above air by using blocks. You could for example cover a hole with a boat

Oh yeah i see. Don't close this yet. let me see if i can do a correction to prevent this from happening.

aromaa commented 1 year ago

Just fyi I'm not willing to accept anything overly complex. And its likely very hard to get this logic right with little gain and big maintainability burden.

JHarris12345 commented 1 year ago

@aromaa I see both sides here. The chances of block phasing with the code provided is extremely low because that method won't return true for if they are gliding over slabs anyway. The current glitch the plugin creates (by being able to hover in place) is (in my opinion) more problematic for servers anyway. Why not add a way to make everyone happy and put a config option for something like "ForceGliderDown" and if this is true, it does what this PR does. If false, it does what you currently do. Default it to false so it doesn't affect anyone if they don't want it to

spookymgmt commented 1 year ago

@aromaa I see both sides here. The chances of block phasing with the code provided is extremely low because that method won't return true for if they are gliding over slabs anyway. The current glitch the plugin creates (by being able to hover in place) is (in my opinion) more problematic for servers anyway. Why not add a way to make everyone happy and put a config option for something like "ForceGliderDown" and if this is true, it does what this PR does. If false, it does what you currently do. Default it to false so it doesn't affect anyone if they don't want it to

I would love this.

aromaa commented 1 year ago

I have had plans to introduce configuration to the flag itself that would allow more fine grained configuration for those who want it. The hovering effect the plugin currently provides was chosen as the middle ground that likely has the least side effects while also blocking the possible abuse.