(cherry picked from commit 80f5db34a6)
This commit is contained in:
Tomáš Hůla 2023-05-21 20:10:12 +02:00 committed by mworzala
parent 1874b238e4
commit 96cd23fa7c
No known key found for this signature in database
GPG Key ID: B148F922E64797C7

View File

@ -36,8 +36,10 @@ public class PlayerVehicleListener {
public static void boatSteerListener(ClientSteerBoatPacket packet, Player player) {
final Entity vehicle = player.getVehicle();
/* The packet may have been received after already exiting the vehicle. */
if (vehicle == null) return;
if (!(vehicle.getEntityMeta() instanceof BoatMeta boat)) return;
boat.setLeftPaddleTurning(packet.leftPaddleTurning());
boat.setRightPaddleTurning(packet.rightPaddleTurning());
}
}
}