Implement new cause versions of BlockIgniteEvent. Addresses BUKKIT-3609, BUKKIT-3656, BUKKIT-3657

This commit is contained in:
Yariv Livay
2013-03-17 22:46:48 +02:00
committed by Travis Watkins
parent 2e6cfdb3cc
commit a7a5f273e3
10 changed files with 104 additions and 77 deletions

View File

@@ -290,7 +290,10 @@ public class Explosion {
int i1 = this.world.getTypeId(i, j - 1, k);
if (l == 0 && Block.s[i1] && this.j.nextInt(3) == 0) {
this.world.setTypeIdUpdate(i, j, k, Block.FIRE.id);
// CraftBukkit start - ignition by explosion.
if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(this.world, i, j, k, this).isCancelled()) {
this.world.setTypeIdUpdate(i, j, k, Block.FIRE.id);
} // CraftBukkit end
}
}
}