13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/BlockCampfire.patch
CraftBukkit/Spigot 147ff6b1e3 SPIGOT-5301: BlockIgniteEvent for campfire + arrow
By: md_5 <git@md-5.net>
2019-09-02 13:14:13 +10:00

15 Zeilen
745 B
Diff

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