PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/AbstractCandleBlock.patch
2021-06-30 18:56:27 +10:00

14 lines
754 B
Diff

--- 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);
}