From 2c05cb355fb522040c088c183dba8ec36a3557ab Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 19 Feb 2011 11:09:23 -0500 Subject: [PATCH] added yield to explosions By: Tahg --- .../bukkit/event/entity/EntityExplodeEvent.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java index f5874fd1a2..098304697f 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java @@ -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 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; + } }