mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Add getIgnitingBlock to BlockBurnEvent
This commit is contained in:
parent
b3034fbbd6
commit
a080ce05bb
2 changed files with 18 additions and 2 deletions
|
@ -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() {
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue