mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
When an entity is being moved as the passenger of an entity from one entity to another, a VehicleExitEvent is fired, but it is assumed that the current entity is a Vehicle. However, entities can be passengers of more than just Vehicles, which causes a ClassCastException to be thrown. This commit fixes the issue by checking that the current entity's vehicle's bukkitEntity is an instance of Vehicle before casting it to Vehicle.