public static void spawnFirework(Location loc) {
Random colour = new Random();
Firework fw = loc.getWorld().spawn(loc, Firework.class);
FireworkMeta fwMeta = fw.getFireworkMeta();
Type fwType = Type.BALL_LARGE;
int c1i = colour.nextInt(17) + 1;
int c2i = colour.nextInt(17) + 1;
Color c1 = getFWColor(c1i);
Color c2 = getFWColor(c2i);
FireworkEffect effect = FireworkEffect.builder().withFade(c2).withColor(c1).with(fwType).build();
fwMeta.addEffect(effect);
fwMeta.setPower(1);
fw.setFireworkMeta(fwMeta);
}
Util.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:Annihilation
作者:
评论列表
文章目录