Expose resetFlyingTicks for Player (#14016)

This commit is contained in:
Justin 2026-08-02 11:32:15 -04:00 committed by GitHub
parent c692832618
commit 281bd76517
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

@ -2077,6 +2077,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public net.kyori.adventure.util.TriState hasFlyingFallDamage();
// Paper end
/**
* Resets the player's flying tick counter used for flight checks.
* <p>
* Only valid once the player's connection is initialized.
*/
public void resetFlyingTicks();
/**
* Hides a player from this player
*

View file

@ -2469,6 +2469,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
}
// Paper end - flying fall damage
@Override
public void resetFlyingTicks() {
if (getHandle().connection == null) {
return;
}
getHandle().connection.resetFlyingTicks();
}
@Override
public void setFlySpeed(float value) {
this.validateSpeed(value);