Skip to content

Allow usage of a plugin instance for Player#setAllowFlight(), like with Player#hideEntity() #10439

@cometcake575

Description

@cometcake575

Is your feature request related to a problem?

In my plugin I sometimes use Player#setAllowFlight() for a few abilities, like allowing players in cobwebs to climb around. However this sometimes causes conflicts with other plugins that add features like /fly.

Describe the solution you'd like.

Similar to the method Player#hideEntity(Plugin, Entity), the setAllowFlight method could also take a plugin as a parameter, enabling flight for a player if at least one plugin enables flight.

This means a /fly plugin could set flying to true, and my plugin could disable flying as it is not needed for any abilities, and the player would still be able to fly.

Describe alternatives you've considered.

I implemented the /fly command with a permission into my own plugin, giving it compatibility with the plugin's features, however other plugins may still use flight for some things so it would work better if they could individually set flight in a way that doesn't interfere with other plugins.

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureRequest for a new Feature.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions