Extend EntityCombustEvent to allow setting combustion duration.

Also extend with two new events that track the entity or block that caused
the combustion.
This commit is contained in:
Andrew Ardill
2011-11-29 20:50:38 +11:00
parent cd942ae2ad
commit b9862ea779
5 changed files with 70 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
package org.bukkit.event.entity;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
public class EntityCombustByBlockEvent extends EntityCombustEvent {
private Block combuster;
public EntityCombustByBlockEvent(Block combuster, Entity combustee, int duration) {
super(combustee, duration);
this.combuster = combuster;
}
/**
* The combuster can be lava or a block that is on fire.
*
* WARNING: block may be null.
* @return the Block that set the combustee alight.
*/
public Block getCombuster() {
return combuster;
}
}