summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2012-05-14 17:23:34 -0500
committerTravis Watkins <amaranth@ubuntu.com>2012-06-04 17:25:39 -0500
commite385ffaefcae4bf40d1a0131637c941c5b8ff9b9 (patch)
tree2885d249f03a0336f8deedeb3fb73a3493a12fc6 /src/main/java/net/minecraft/server
parentd8199aaa394b4f041dbfce08813f4f6ff271eb45 (diff)
downloadcraftbukkit-e385ffaefcae4bf40d1a0131637c941c5b8ff9b9.tar
craftbukkit-e385ffaefcae4bf40d1a0131637c941c5b8ff9b9.tar.gz
craftbukkit-e385ffaefcae4bf40d1a0131637c941c5b8ff9b9.tar.lz
craftbukkit-e385ffaefcae4bf40d1a0131637c941c5b8ff9b9.tar.xz
craftbukkit-e385ffaefcae4bf40d1a0131637c941c5b8ff9b9.zip
Call ignite event for fireball shot from dispenser.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/EntitySmallFireball.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySmallFireball.java b/src/main/java/net/minecraft/server/EntitySmallFireball.java
index 6cd2008c..bfd8e824 100644
--- a/src/main/java/net/minecraft/server/EntitySmallFireball.java
+++ b/src/main/java/net/minecraft/server/EntitySmallFireball.java
@@ -1,6 +1,9 @@
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 {
@@ -63,7 +66,15 @@ public class EntitySmallFireball extends EntityFireball {
}
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
}
}