Paper
Paper copied to clipboard
Set player allowFlight fall damage
I have added a method in order to allow fall damage, even with allowFlight enabled. This is mostly for my own double jump plugin but can be used anywhere.
I am happy to make changes to this and I have left allow edits by maintainers on. Feel free to ask any questions about this.
I believe that is all I need. Sorry for the ungodly amount of commits.
I have rebased this so it works on 1.16.5-R0.2-SNAPSHOT.
Are there any updates I need to do? I just want to publish the new version of my plugin as soon as I can.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have rebased it successfully. I have also added a configuration option for it.
Are there any updates on this? I can rebase one last time if needed.
I have fixed those issues and rebased it to the latest commit!
I have added the tristate option as requested by @Owen1212055. I also removed the config option because I felt it was unnecessary and confusing while using a tristate option.
Why isn't it just a method param of setAllowFlight?
Why isn't it just a method param of
setAllowFlight?
It doesn't make sense to combine it like that. These are essentially two different values.
Additionally, I feel that serializing this value is unneeded, setAllowFlight/setFlying doesn't even save when a player rejoins after setting it through api.
Maybe it's better to just have plugins serialize it themselves?
Thank you for your contribution, sorry for the wait! 😦 I have merged this but not included the serialization due to the reason listed above, as in general even the flying state of the player isn't serialized with the player.