mirror of
https://github.com/PaperMC/Paper.git
synced 2026-10-12 02:08:46 +00:00
Expose resetFlyingTicks for Player (#14016)
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user