mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Call ignite event for fireball shot from dispenser.
This commit is contained in:
parent
d8199aaa39
commit
e385ffaefc
1 changed files with 13 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
import org.bukkit.event.entity.EntityCombustByEntityEvent; // CraftBukkit
|
// CraftBukkit start
|
||||||
|
import org.bukkit.event.block.BlockIgniteEvent;
|
||||||
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
public class EntitySmallFireball extends EntityFireball {
|
public class EntitySmallFireball extends EntityFireball {
|
||||||
|
|
||||||
|
@ -63,7 +66,15 @@ public class EntitySmallFireball extends EntityFireball {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.world.isEmpty(i, j, k)) {
|
if (this.world.isEmpty(i, j, k)) {
|
||||||
this.world.setTypeId(i, j, k, Block.FIRE.id);
|
// 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()) {
|
||||||
|
this.world.setTypeId(i, j, k, Block.FIRE.id);
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue