PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockCampfire.patch
CraftBukkit/Spigot 18496e998f Repackage patches
By: md_5 <git@md-5.net>
2021-03-16 09:00:00 +11:00

14 lines
728 B
Diff

--- a/net/minecraft/server/BlockCampfire.java
+++ b/net/minecraft/server/BlockCampfire.java
@@ -144,6 +144,11 @@
if (flag && !(Boolean) iblockdata.get(BlockCampfire.LIT) && !(Boolean) iblockdata.get(BlockCampfire.d)) {
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, iprojectile).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockProperties.r, true), 11);
}
}