Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VehicleEnterEvent is thrown when a plugin adds a passenger to a vehicle #11930

Open
Kowaman opened this issue Jan 8, 2025 · 0 comments
Open

Comments

@Kowaman
Copy link

Kowaman commented Jan 8, 2025

Is your feature request related to a problem?

When using Entity#addPassenger, the event that is thrown - VehicleEnterEvent should it be a vehicle. The same is done when a player manually enters a vehicle. If you want to cancel the event, there is no straightforward way to distinguish between these two causes.

Describe the solution you'd like.

Add getVehicleEnterCause to VehicleEnterEvent, similar to TeleportCause

Describe alternatives you've considered.

Cancelling the interact event instead, though it's a bit less clean of a workaround. A way to properly distinguish player vs plugin passenger adding would be ideal

Other

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant