Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Set player allowFlight fall damage

Open TreyRuffy opened this issue 4 years ago • 11 comments

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.

TreyRuffy avatar Mar 13 '21 22:03 TreyRuffy

I believe that is all I need. Sorry for the ungodly amount of commits.

TreyRuffy avatar Mar 16 '21 03:03 TreyRuffy

I have rebased this so it works on 1.16.5-R0.2-SNAPSHOT.

TreyRuffy avatar Mar 18 '21 22:03 TreyRuffy

Are there any updates I need to do? I just want to publish the new version of my plugin as soon as I can.

TreyRuffy avatar Mar 24 '21 04:03 TreyRuffy

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.

stale[bot] avatar Aug 19 '21 12:08 stale[bot]

I have rebased it successfully. I have also added a configuration option for it.

TreyRuffy avatar Aug 21 '21 22:08 TreyRuffy

Are there any updates on this? I can rebase one last time if needed.

TreyRuffy avatar Oct 18 '21 16:10 TreyRuffy

I have fixed those issues and rebased it to the latest commit!

TreyRuffy avatar Oct 20 '21 02:10 TreyRuffy

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.

TreyRuffy avatar May 27 '22 23:05 TreyRuffy

Why isn't it just a method param of setAllowFlight?

Leguan16 avatar May 29 '22 17:05 Leguan16

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.

Owen1212055 avatar May 29 '22 17:05 Owen1212055

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?

Owen1212055 avatar Oct 23 '22 15:10 Owen1212055

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.

Owen1212055 avatar Dec 27 '22 20:12 Owen1212055