Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void boom(Player p, Location l)
- {
- FireworkEffect effect = FireworkEffect.builder().trail(false).flicker(false).withColor(Color.RED).withFade(Color.ORANGE).with(FireworkEffect.Type.BALL).build();
- final Firework fw = p.getWorld().spawn(l, Firework.class);
- FireworkMeta meta = fw.getFireworkMeta();
- meta.addEffect(effect);
- meta.setPower(0);
- fw.setFireworkMeta(meta);
- new BukkitRunnable() {
- @Override
- public void run() {
- fw.detonate();
- }
- }.runTaskLater(this, 2L); // this = Plugin class (your Main class )
- }
- /* Author : Pixpeez | Version : 0.1 | date : 07/05/16 | For Spigot/Bukkit version : 1.9 R1 |
- Youtube : http://youtube.com/pixpeez
- Twitter : twitter.com/@Cosmonocx */
Advertisement
Add Comment
Please, Sign In to add comment