diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/event/block/BlockBurnEvent.java | 18 | ||||
-rw-r--r-- | src/main/java/org/bukkit/event/block/BlockIgniteEvent.java | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/event/block/BlockBurnEvent.java b/src/main/java/org/bukkit/event/block/BlockBurnEvent.java index 1592a158..e7934d2a 100644 --- a/src/main/java/org/bukkit/event/block/BlockBurnEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockBurnEvent.java @@ -13,10 +13,26 @@ import org.bukkit.event.HandlerList; public class BlockBurnEvent extends BlockEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private boolean cancelled; + private final Block ignitingBlock; + @Deprecated public BlockBurnEvent(final Block block) { + this(block, null); + } + + public BlockBurnEvent(final Block block, final Block ignitingBlock) { super(block); - this.cancelled = false; + this.ignitingBlock = ignitingBlock; + } + + /** + * Gets the block which ignited this block. + * + * @return The Block that ignited and burned this block, or null if no + * source block exists + */ + public Block getIgnitingBlock() { + return ignitingBlock; } public boolean isCancelled() { diff --git a/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java b/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java index 3c85866e..b7435608 100644 --- a/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java @@ -75,7 +75,7 @@ public class BlockIgniteEvent extends BlockEvent implements Cancellable { } /** - * Gets the block who ignited this block + * Gets the block which ignited this block * * @return The Block that placed/ignited the fire block, or null if not ignited by a Block. */ |