geforkt von Mirrors/Paper
SPIGOT-5301: BlockIgniteEvent for campfire + arrow
Dieser Commit ist enthalten in:
Ursprung
96bc85f0b4
Commit
403ac18579
14
nms-patches/BlockCampfire.patch
Normale Datei
14
nms-patches/BlockCampfire.patch
Normale Datei
@ -0,0 +1,14 @@
|
|||||||
|
--- 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);
|
||||||
|
}
|
||||||
|
}
|
@ -1173,6 +1173,9 @@ public class CraftEventFactory {
|
|||||||
case FIREBALL:
|
case FIREBALL:
|
||||||
cause = IgniteCause.FIREBALL;
|
cause = IgniteCause.FIREBALL;
|
||||||
break;
|
break;
|
||||||
|
case ARROW:
|
||||||
|
cause = IgniteCause.ARROW;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cause = IgniteCause.FLINT_AND_STEEL;
|
cause = IgniteCause.FLINT_AND_STEEL;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren