13
0
geforkt von Mirrors/Paper

Add getIgnitingBlock to BlockBurnEvent

By: Nathan Wolf <nathan@elmakers.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2017-03-08 14:19:47 -08:00
Ursprung c6855936ce
Commit 217c93b86b
2 geänderte Dateien mit 18 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -13,10 +13,26 @@ import org.bukkit.event.HandlerList;
public class BlockBurnEvent extends BlockEvent implements Cancellable { public class BlockBurnEvent extends BlockEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList(); private static final HandlerList handlers = new HandlerList();
private boolean cancelled; private boolean cancelled;
private final Block ignitingBlock;
@Deprecated
public BlockBurnEvent(final Block block) { public BlockBurnEvent(final Block block) {
this(block, null);
}
public BlockBurnEvent(final Block block, final Block ignitingBlock) {
super(block); 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() { public boolean isCancelled() {

Datei anzeigen

@ -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. * @return The Block that placed/ignited the fire block, or null if not ignited by a Block.
*/ */