summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-02-19 11:09:23 -0500
committerTahg <tahgtahv@gmail.com>2011-02-19 23:36:59 -0500
commitb2847fdf8c7e217f092c97ef685a170cf2f236e4 (patch)
treeae9de79a16cb53580951fa13f820cb8dd4a6d999 /src
parent414a19e247c11e5cca6cfc9fc1a1b03f5791c6aa (diff)
downloadbukkit-b2847fdf8c7e217f092c97ef685a170cf2f236e4.tar
bukkit-b2847fdf8c7e217f092c97ef685a170cf2f236e4.tar.gz
bukkit-b2847fdf8c7e217f092c97ef685a170cf2f236e4.tar.lz
bukkit-b2847fdf8c7e217f092c97ef685a170cf2f236e4.tar.xz
bukkit-b2847fdf8c7e217f092c97ef685a170cf2f236e4.zip
added yield to explosions
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
index f5874fd1..09830469 100644
--- a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
+++ b/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<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;
+ }
}