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

Vehicle Events #7260

Open
wants to merge 9 commits into
base: dev/feature
Choose a base branch
from

Conversation

TheAbsolutionism
Copy link
Contributor

Description

This PR aims to add additional Vehicle Events


Target Minecraft Versions: any
Requirements: none
Related Issues: none

Comment on lines +20 to +21
Skript.registerEvent("Vehicle Collision", EvtVehicleCollision.class, new Class[]{VehicleBlockCollisionEvent.class, VehicleEntityCollisionEvent.class}
,"vehicle collision [(with|of) [a[n]] %-itemtypes/blockdatas/entitydatas%]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Skript.registerEvent("Vehicle Collision", EvtVehicleCollision.class, new Class[]{VehicleBlockCollisionEvent.class, VehicleEntityCollisionEvent.class}
,"vehicle collision [(with|of) [a[n]] %-itemtypes/blockdatas/entitydatas%]",
Skript.registerEvent("Vehicle Collision", EvtVehicleCollision.class, new Class[]{VehicleBlockCollisionEvent.class, VehicleEntityCollisionEvent.class},
"vehicle collision [(with|of) [a[n]] %-itemtypes/blockdatas/entitydatas%]",

if (args[0] != null) {
expr = args[0];
types = args[0].getArray();
blockSpecific = !(types instanceof EntityData<?>[]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't safe, what if it's a mixed input of blocks and entities?

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

Successfully merging this pull request may close these issues.

4 participants