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

This commit is contained in:
Yariv Livay authored and Travis Watkins committed 2013-03-18 12:47:01 -05:00
1 parent 2e6cfdb3cc
commit a7a5f273e3
10 files changed
+104 -77

No files matched your search

@@ -1,7 +1,7 @@
package net.minecraft.server;
// CraftBukkit start
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.event.entity.EntityCombustByEntityEvent;
// CraftBukkit end
@@ -67,11 +67,7 @@ public class EntitySmallFireball extends EntityFireball {
if (this.world.isEmpty(i, j, k)) {
// CraftBukkit start
org.bukkit.block.Block block = world.getWorld().getBlockAt(i, j, k);
BlockIgniteEvent event = new BlockIgniteEvent(block, BlockIgniteEvent.IgniteCause.FIREBALL, null);
world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
if (!CraftEventFactory.callBlockIgniteEvent(world, i, j, k, this).isCancelled()) {
this.world.setTypeIdUpdate(i, j, k, Block.FIRE.id);
}
// CraftBukkit end