use of com.laytonsmith.abstraction.bukkit.entities.BukkitMCFirework in project CommandHelper by EngineHub.
the class BukkitMCWorld method launchFirework.
@Override
public MCFirework launchFirework(MCLocation l, int strength, List<MCFireworkEffect> effects) {
Firework firework = (Firework) w.spawnEntity(((BukkitMCLocation) l).asLocation(), EntityType.FIREWORK);
FireworkMeta meta = firework.getFireworkMeta();
meta.setPower(strength);
for (MCFireworkEffect effect : effects) {
meta.addEffect((FireworkEffect) effect.getHandle());
}
firework.setFireworkMeta(meta);
return new BukkitMCFirework(firework);
}
Aggregations