mirror of
https://github.com/PaperMC/Paper
synced 2026-08-20 18:26:12 -04:00
Expose resetFlyingTicks for Player (#14016)
This commit is contained in:
parent
c692832618
commit
281bd76517
2 changed files with 18 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue