summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java8
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;
+ }
}