diff options
author | Wesley Wolfe <weswolf@aol.com> | 2013-12-06 00:05:23 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-12-06 00:05:23 -0600 |
commit | dc86362c9ad7c4c617640cdc1a17cb423921e7a1 (patch) | |
tree | 192b8561f7fe7bd2305f99ea785bf72356201ee9 /src/main/java | |
parent | 8a29829d1acd80952686145ef8dd363e4c84cc2c (diff) | |
download | craftbukkit-dc86362c9ad7c4c617640cdc1a17cb423921e7a1.tar craftbukkit-dc86362c9ad7c4c617640cdc1a17cb423921e7a1.tar.gz craftbukkit-dc86362c9ad7c4c617640cdc1a17cb423921e7a1.tar.lz craftbukkit-dc86362c9ad7c4c617640cdc1a17cb423921e7a1.tar.xz craftbukkit-dc86362c9ad7c4c617640cdc1a17cb423921e7a1.zip |
Implement Firework.detonate(). Adds BUKKIT-4538
This implements the detonate method from bukkit by setting the fuse
timer to 0. This makes a firework explode using the normal codepath,
but without waiting for the fuse.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java index 7082d625..5437d859 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -47,14 +47,17 @@ public class CraftFirework extends CraftEntity implements Firework { return "CraftFirework"; } + @Override public EntityType getType() { return EntityType.FIREWORK; } + @Override public FireworkMeta getFireworkMeta() { return (FireworkMeta) item.getItemMeta(); } + @Override public void setFireworkMeta(FireworkMeta meta) { item.setItemMeta(meta); @@ -63,4 +66,9 @@ public class CraftFirework extends CraftEntity implements Firework { getHandle().getDataWatcher().h(FIREWORK_ITEM_INDEX); // Update } + + @Override + public void detonate() { + getHandle().expectedLifespan = 0; + } } |