SPIGOT-6613: Missing BlockIgniteEvent for candles + projectiles

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2021-06-30 18:56:27 +10:00
parent 80472fd082
commit bfa7716ca1

View File

@ -0,0 +1,14 @@
--- a/net/minecraft/world/level/block/AbstractCandleBlock.java
+++ b/net/minecraft/world/level/block/AbstractCandleBlock.java
@@ -39,6 +39,11 @@
@Override
public void a(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
if (!world.isClientSide && iprojectile.isBurning() && this.c(iblockdata)) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, movingobjectpositionblock.getBlockPosition(), iprojectile).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
a(world, iblockdata, movingobjectpositionblock.getBlockPosition(), true);
}