Don't allow flying whilst in a boat. Fixes #377

This commit is contained in:
Sollace 2024-06-23 15:37:24 +01:00
parent 498ec2bca0
commit 302a033710
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -27,7 +27,7 @@ public class ToggleFlightAbility implements Ability<Hit> {
@Nullable @Nullable
@Override @Override
public Optional<Hit> prepare(Pony player) { public Optional<Hit> prepare(Pony player) {
return Hit.of(!player.asEntity().isCreative() && !player.getPhysics().getFlightType().isGrounded()); return Hit.of(!player.asEntity().hasVehicle() && !player.asEntity().isCreative() && !player.getPhysics().getFlightType().isGrounded());
} }
@Override @Override