mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-27 06:03:01 +02:00
refresh pose on gamemode change (#1888)
This commit is contained in:
parent
2947279898
commit
aad7bdab0f
@ -1589,13 +1589,21 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
this.allowFlying = true;
|
||||
this.instantBreak = false;
|
||||
this.invulnerable = true;
|
||||
this.flying = true;
|
||||
if (isActive()) {
|
||||
refreshFlying(true);
|
||||
} else {
|
||||
this.flying = true;
|
||||
}
|
||||
}
|
||||
default -> {
|
||||
this.allowFlying = false;
|
||||
this.instantBreak = false;
|
||||
this.invulnerable = false;
|
||||
this.flying = false;
|
||||
if (isActive()) {
|
||||
refreshFlying(false);
|
||||
} else {
|
||||
this.flying = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Make sure that the player is in the PLAY state and synchronize their flight speed.
|
||||
|
Loading…
Reference in New Issue
Block a user