summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlphaBlend <whizkid3000@hotmail.com>2013-03-21 12:48:53 -0600
committerNate Mortensen <nate.richard.mortensen@gmail.com>2013-03-21 12:48:53 -0600
commit9c1bc74618e5aa23224e6f814b4d4a8a5a026ddf (patch)
treecf41b1458a754e294688d25a6d73578089326ee0 /src
parentf416636f062c28d44bf278cde719fbc35cc1d7b3 (diff)
downloadbukkit-9c1bc74618e5aa23224e6f814b4d4a8a5a026ddf.tar
bukkit-9c1bc74618e5aa23224e6f814b4d4a8a5a026ddf.tar.gz
bukkit-9c1bc74618e5aa23224e6f814b4d4a8a5a026ddf.tar.lz
bukkit-9c1bc74618e5aa23224e6f814b4d4a8a5a026ddf.tar.xz
bukkit-9c1bc74618e5aa23224e6f814b4d4a8a5a026ddf.zip
Add method to get the source of a TNTPrimed. Adds BUKKIT-3815
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/entity/TNTPrimed.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
index bf4ea515..948859e2 100644
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
@@ -12,9 +12,27 @@ public interface TNTPrimed extends Explosive {
public void setFuseTicks(int fuseTicks);
/**
- * Retrieve the number of ticks until the explosion of this TNTPrimed entity
+ * Retrieve the number of ticks until the explosion of this TNTPrimed
+ * entity
*
* @return the number of ticks until this TNTPrimed explodes
*/
public int getFuseTicks();
+
+ /**
+ * Gets the source of this primed TNT. The source is the entity
+ * responsible for the creation of this primed TNT.
+ * (I.E. player ignites TNT with flint and steel.) Take note
+ * that this can be null if there is no suitable source.
+ * (created by the {@link org.bukkit.World#spawn(Location, Class)}
+ * method, for example.)
+ *
+ * The source will become null if the chunk this primed TNT is in
+ * is unloaded then reloaded. If the source Entity becomes invalidated
+ * for any reason, such being removed from the world, the returned value
+ * will be null.
+ *
+ * @return the source of this primed TNT
+ */
+ public Entity getSource();
}