eccentricdevotion / TARDIS

A Spigot / Paper plugin for all Doctor Who fans - create and use a TARDIS! It's bigger on the inside!
GNU General Public License v3.0
80 stars 27 forks source link

Exterior flight allows landing in WorldGuard protected regions #920

Open DrPepplies opened 1 week ago

DrPepplies commented 1 week ago

Describe the bug

Exterior flight is allowed to land anywhere, including regions that are blocked from TARDIS landing.

To Reproduce

  1. Set up a WG region with the flag that blocks landing
  2. Start exterior flight, and fly to the region
  3. Land
  4. Your TARDIS lands
  5. Try /tardis comehere in the same region and confirm it doesn't work that way

Screenshots

No response

Log files

Paste configs or pastebin.com link here!

'/tardis version' output

[TARDIS] Server version: 1.21.1-77-4ff58c4 (MC: 1.21.1)
[TARDIS] TARDIS version: 5.7.5-b2992
[TARDIS] Vault version: 1.7.3-b131
[TARDIS] dynmap version: 3.7-SNAPSHOT-948
[TARDIS] Multiverse-Core version: 4.3.2-SNAPSHOT-b870
[TARDIS] CoreProtect version: 23.1
[TARDIS] WorldGuard version: 7.0.12+829a4a4
[TARDIS] WorldBorder version: 1.9.10 (beta)
[TARDIS] floodgate version: 2.2.3-SNAPSHOT (b111-3db8e59)
[TARDIS] LibsDisguises version: 10.0.44
[TARDIS] Checking for new TARDIS builds...
[TARDIS] You are running the latest version!
eccentricdevotion commented 2 days ago

Not sure that this will be possible as the feature works by intercepting and reading client packets - the landing is triggered by reading the "dismount" key being pressed (normally the shift key). The plugin can't cancel client interactions as it is only server based. We could potentially remount the player, but it would probably lead to issues due to delay/lag. If you're worried about griefing, then limit the feature to trusted players only - though the amount of griefing possible by landing an armour stand is pretty minimal imho.

DrPepplies commented 1 day ago

I suppose maybe it could stop them ever entering the region? Like the same effect that'd happen if the region had the entry: deny flag set.

Or maybe when they dismount, if they were in a blocked region it keeps them in the vortex and removes the armor stand, as if they took off with normal non-exterior flight? Then it wouldn't let them land as usual because it's a protected region.

You're right it's not really a big grief problem but we use that flag to stop people parking in front of the server rules and information and things so it only takes one tardis in the way to block people's view.