mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Fix flying clip bug
This commit is contained in:
parent
7737d0e5b3
commit
73ea79bed2
@ -1658,6 +1658,15 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
refreshAbilities();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSneaking(boolean sneaking) {
|
||||
if(isFlying()) { //If we are flying, don't set the players pose to sneaking as this can clip them through blocks
|
||||
this.entityMeta.setSneaking(sneaking);
|
||||
} else {
|
||||
super.setSneaking(sneaking);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets if the player is currently flying.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user