summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorTaylor Kelly <tkelly910@gmail.com>2011-01-30 15:30:30 -0500
committerTaylor Kelly <tkelly910@gmail.com>2011-01-30 15:30:30 -0500
commit35aac122356b7237e461c8e1faf0c7b49e308aef (patch)
treed54385243e91d7c2647cb658b8d8a9667610e560 /src/main/java/net/minecraft
parent914688e2a07dc99421a3c512c2df59b770ea3d17 (diff)
downloadcraftbukkit-35aac122356b7237e461c8e1faf0c7b49e308aef.tar
craftbukkit-35aac122356b7237e461c8e1faf0c7b49e308aef.tar.gz
craftbukkit-35aac122356b7237e461c8e1faf0c7b49e308aef.tar.lz
craftbukkit-35aac122356b7237e461c8e1faf0c7b49e308aef.tar.xz
craftbukkit-35aac122356b7237e461c8e1faf0c7b49e308aef.zip
Re-add BlockBurnEvent
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/BlockFire.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index f7ec1ea4..85dc9d42 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -120,16 +120,24 @@ public class BlockFire extends Block {
if (random.nextInt(l) < i1) {
boolean flag = world.getTypeId(i, j, k) == Block.TNT.id;
+ // CraftBukkit start: BlockBurnEvent
+ Server server = ((WorldServer)world).getServer();
+ CraftWorld cworld = ((WorldServer)world).getWorld();
+ org.bukkit.block.Block theBlock = (cworld.getBlockAt(i, j, k));
+ BlockBurnEvent burnEvent = new BlockBurnEvent(theBlock);
+ server.getPluginManager().callEvent(burnEvent);
+ if(!burnEvent.isCancelled()) {
+ if (random.nextInt(2) == 0) {
+ world.e(i, j, k, this.id);
+ } else {
+ world.e(i, j, k, 0);
+ }
- if (random.nextInt(2) == 0) {
- world.e(i, j, k, this.id);
- } else {
- world.e(i, j, k, 0);
- }
-
- if (flag) {
- Block.TNT.a(world, i, j, k, 0);
+ if (flag) {
+ Block.TNT.a(world, i, j, k, 0);
+ }
}
+ // CraftBukkit end: BlockBurnEvent
}
}