BentoBoxWorld / IslandFly

Gives players the fly command
Eclipse Public License 2.0
3 stars 9 forks source link

Make the addon memorize whether fly was toggled on by the player on their own island, so it automatically turns on again whenever they leave and then go back to their own island. #117

Closed SenorFlamingo closed 3 weeks ago

SenorFlamingo commented 1 month ago

Is your feature request related to a problem?

Some people want to go and explore the rest of the server or have to teleport back and forth for some specific NPCs. If the destination they teleport to has fly disabled, it will automatically disable but not turn back on whenever they're back onto their island.

Describe the solution you'd like.

Make the addon remember whether /fly was activated or not, and if the case is that it's activated before, make it automatically turn back on for the player after they've teleported to a different place.

Describe alternatives you've considered.

No alternatives that I could've thinked of.

Agreements

Other

No response

tastybento commented 3 weeks ago

Would this be specific only to teleporting back to their island from another world? What command would they be using to teleport? I assume most of the time they will be using /island or similar so arrive back at a safe spot.

SenorFlamingo commented 3 weeks ago

Not specific from a world change, just anytime the players leaves their island if that is possible.

The commands that are used are indeed /island, but some commands also come from the CMI plugin, more specifically /cmi back to return to the player's last location before teleporting somewhere and any homes that are set as well by the player.

tastybento commented 3 weeks ago

Try the latest snapshot on ci.bentobox.world and let me know if it works for you. As players can have multiple islands now, this will store the fly state for any of them. Upon return, it will reinstate the fly mode (unless it's not allowed anymore).

SenorFlamingo commented 3 weeks ago

Seems to be working, but there seems to be a odd case currently with /cmi back that you get teleported to y -63 if you use that command, but that is only if you're flying with /is fly above void and nothing under it. But I think that's a CMI thing?

tastybento commented 3 weeks ago

Yes, I am guessing that CMI tries to find ground to put you on so you don't drop but cannot so you end up there. Essentials has a back command. I'm not sure if that does the same thing.

SenorFlamingo commented 3 weeks ago

Thank you!