mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
removed duplicate ProjectileHitEvent for fireball (#5671)
This commit is contained in:
parent
9df8439b8b
commit
537bd9de29
1 changed files with 4 additions and 3 deletions
|
@ -1,9 +1,10 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 16 Jan 2021 14:30:12 -0500
|
||||
Subject: [PATCH] Respect ProjectileHitEvent cancel where missing
|
||||
Subject: [PATCH] Remove ProjectileHitEvent call when fireballs dead
|
||||
|
||||
The duplicate ProjectileHitEvent in EntityFireball was not cancelled
|
||||
The duplicate ProjectileHitEvent in EntityFireball was removed. The
|
||||
event was always called before the duplicate call.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
@ -14,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// CraftBukkit start - Fire ProjectileHitEvent
|
||||
if (this.dead) {
|
||||
- CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
|
||||
+ if (CraftEventFactory.callProjectileHitEvent(this, movingobjectposition).isCancelled()) return; // Paper - this is an undesired duplicate event, but make cancellable
|
||||
+ // CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Paper - this is an undesired duplicate event
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
Loading…
Reference in a new issue