added yield to explosions

By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
Bukkit/Spigot 2011-02-19 11:09:23 -05:00
parent 1257e0d24f
commit 2c05cb355f

View file

@ -15,6 +15,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
private boolean cancel;
private Location location;
private List blocks;
private float yield = 0.3F;
public EntityExplodeEvent (Type type, Entity what, Location location, List<Block> blocks) {
super(type.ENTITY_EXPLODE, what);
@ -48,4 +49,18 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
return location;
}
/**
* Returns the percentage of blocks to drop from this explosion
* @return
*/
public float getYield() {
return yield;
}
/**
* Sets the percentage of blocks to drop from this explosion
*/
public void setYield(float yield) {
this.yield = yield;
}
}