SPIGOT-3882: Extra call site for VehicleEntityCollisionEvent

Dieser Commit ist enthalten in:
md_5 2018-04-02 12:55:28 +10:00
Ursprung 1daee53916
Commit 68b4fb6427

Datei anzeigen

@ -206,7 +206,22 @@
this.motX *= 0.996999979019165D;
this.motY *= 0.0D;
this.motZ *= 0.996999979019165D;
@@ -780,4 +873,26 @@
@@ -618,6 +711,14 @@
if (!this.world.isClientSide) {
if (!entity.noclip && !this.noclip) {
if (!this.w(entity)) {
+ // CraftBukkit start
+ VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity());
+ this.world.getServer().getPluginManager().callEvent(collisionEvent);
+
+ if (collisionEvent.isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
double d0 = entity.locX - this.locX;
double d1 = entity.locZ - this.locZ;
double d2 = d0 * d0 + d1 * d1;
@@ -780,4 +881,26 @@
}
}