Implement new cause versions of BlockIgniteEvent. Addresses BUKKIT-3609, BUKKIT-3656, BUKKIT-3657
This commit is contained in:
committed by
Travis Watkins
parent
2e6cfdb3cc
commit
a7a5f273e3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user