added yield to explosions
This commit is contained in:
parent
414a19e247
commit
b2847fdf8c
@ -15,6 +15,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
|||||||
private boolean cancel;
|
private boolean cancel;
|
||||||
private Location location;
|
private Location location;
|
||||||
private List blocks;
|
private List blocks;
|
||||||
|
private float yield = 0.3F;
|
||||||
|
|
||||||
public EntityExplodeEvent (Type type, Entity what, Location location, List<Block> blocks) {
|
public EntityExplodeEvent (Type type, Entity what, Location location, List<Block> blocks) {
|
||||||
super(type.ENTITY_EXPLODE, what);
|
super(type.ENTITY_EXPLODE, what);
|
||||||
@ -48,4 +49,18 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
|||||||
return location;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user