mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-24 13:34:53 +02:00
Set proper pose once flying finishes
This commit is contained in:
parent
73ea79bed2
commit
1933914bbc
|
@ -1682,6 +1682,16 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
|||
* @param flying should the player fly
|
||||
*/
|
||||
public void setFlying(boolean flying) {
|
||||
if(this.flying != flying) {
|
||||
Pose pose = getPose();
|
||||
|
||||
if(this.isSneaking() && pose == Pose.STANDING) {
|
||||
setPose(Pose.SNEAKING);
|
||||
} else if(pose == Pose.SNEAKING) {
|
||||
setPose(Pose.STANDING);
|
||||
}
|
||||
}
|
||||
|
||||
this.flying = flying;
|
||||
refreshAbilities();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user