IntellectualSites / PlotSquared

PlotSquared - Reinventing the plotworld
GNU General Public License v3.0
548 stars 749 forks source link

Keep up flight status on plot exit #3743

Open ch4ika opened 2 years ago

ch4ika commented 2 years ago

Server Implementation

Paper

Server Version

1.16.5

Describe the bug

If you have the permission ''plots.admin.flight" and you are in survival or adventure mode and you can fly with a command like /fly (essentials), for example, this flight status is always removed when exiting the plot, but only with People who have this permission, since you skip the flycheck when entering a plot.

To Reproduce

  1. Have the permission plots.admin.flight or simply op.
  2. Be in survival or adventure mode and have a command like /fly.
  3. Have a plot with a fly flag.
  4. As soon as you exit a plot, your flight status is always removed.

Expected behaviour

Without the permission, the player will get a MetaData with his flight status, but with the permission ''plots.admin.flight" this flycheck will be ignored and so when leaving a plot it is only checked if the player is in survival or adventure mode that the flight status is removed.

The game mode is checked first, then whether the player can fly. But it should be checked first if the player is in creature or spectator mode and then if the player can fly at all and if not the flight status should be removed.

Screenshots / Videos

No response

Error log (if applicable)

No response

Plot Debugpaste

https://athion.net/ISPaster/paste/view/4bef94cff0d24200975ab29503f30470

PlotSquared Version

PlotSquared-6.9.2-Premium

Checklist

Anything else?

No response

NotMyFault commented 2 years ago

If I understood the issue correctly, you the flight status shouldn't be removed if the player is in creative mode? Is that what you are suggesting?

CommandDan commented 2 years ago

I think they are suggesting that flight should not be removed if your permission for flight persists outside the plot.

That it currently is removed even if you are allowed to fly outside.

ch4ika commented 2 years ago

exactly what @CommandDan means. It doesn't make sense to me that if you don't have plots.admin.flight permission you can fly anywhere if you have flight status but not as an player who has the permission. It's just that players who have Permission always have their flight status removed.