#776: Add ability to cancel ProjectileHitEvent
By: Martoph <sager1018@gmail.com>
This commit is contained in:
@@ -29,10 +29,12 @@
|
||||
double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
|
||||
|
||||
if (d6 != 0.0D) {
|
||||
@@ -64,6 +74,12 @@
|
||||
@@ -63,7 +73,13 @@
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.a((Entity) this, this::a);
|
||||
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||
this.a(movingobjectposition);
|
||||
- this.a(movingobjectposition);
|
||||
+ this.preOnHit(movingobjectposition); // CraftBukkit - projectile hit event
|
||||
+
|
||||
+ // CraftBukkit start - Fire ProjectileHitEvent
|
||||
+ if (this.dead) {
|
||||
|
||||
Reference in New Issue
Block a user