[Suggestion] Restore Flight Status on World Change
BlackBeltPanda opened this issue ยท 9 comments
A suggestion from my players is to restore the flight status when changing to a world that allows flight.
On my Skyblock server, this would be especially handy as often my players forget to re-enable flight and jump off their island expecting to be able to fly only to fall into the void. XD
Here's a test version. Could you please try it out? If you set the new toggleFlyingInNonBlockedWorlds
configuration option to true
, players will automatically start flying when joining a world in which flying is not blocked by the plugin.
The version is still labelled 2.2.6, but will change to 2.3 once the official update is released!
Looking at the commits, it seems the new option allows any player to fly?
I have groups of players that are allowed to fly while regular players aren't allowed to.
Alternatively, you could store players' flight status in a HashMap, though it won't survive plugin reloads or server restarts without storing it to a file on plugin disable.
A good way to do it might be to check for two permissions. You could have one for AntiWorldFly and also a compatibility permission for Essentials' "essentials.fly" permission, as that's probably what most people use for flight. So just a simple
if (player.hasPermission("antiworldfly.fly") || player.hasPermission("essentials.fly"))
That way server owners who don't use Essentials can still specify a permission for flight and those who do use Essentials don't have to change their existing permissions setup.
Permissions seem like the most sensible option. Have just done an additional commit!