Skip to content

Expose resetFlyingTicks for Player#14016

Open
BitByLogics wants to merge 3 commits into
PaperMC:mainfrom
BitByLogics:feat/reset-flying-ticks-method
Open

Expose resetFlyingTicks for Player#14016
BitByLogics wants to merge 3 commits into
PaperMC:mainfrom
BitByLogics:feat/reset-flying-ticks-method

Conversation

@BitByLogics

Copy link
Copy Markdown

Simply adds a method to Player which exposes the resetFlyingTicks method from ServerGamePacketListenerImpl.

This is particularly useful for preventing the "flying" kick without having event spam. While you could enable the "allow-flight" option in server.properties, I find that allowing developers to have a method to reset this counter themselves would be useful.

For example, my use case is for my PacketBlocks plugin where players standing on them would be kicked for flying. Currently I require you to enable"allow-flight" however understandbly some server owners may not want to do this.

@Bishops-exe Bishops-exe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Comment thread paper-api/src/main/java/org/bukkit/entity/Player.java Outdated
@github-project-automation github-project-automation Bot moved this from Awaiting review to Changes required in Paper PR Queue Jul 2, 2026
@BitByLogics BitByLogics requested a review from lynxplay July 3, 2026 05:58
@Lulu13022002

Copy link
Copy Markdown
Contributor

Might be better on the connection otherwise check if the connection is null before for early events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changes required

Development

Successfully merging this pull request may close these issues.

4 participants