Fireworks.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:tregmine 作者:
public static void Fireworks(Player p){
    Firework rfw = (Firework) p.getWorld()
            .spawnEntity(p.getLocation(),EntityType.FIREWORK);
    FireworkMeta rfwm = rfw.getFireworkMeta();
    FireworkEffect.Type rtype = FireworkEffect.Type.BALL_LARGE;
    FireworkEffect reffect = (FireworkEffect.builder().trail(false)
            .withColor(Color.RED).flicker(false).with(rtype).build());
    rfwm.addEffect(reffect);
    rfwm.setPower(0);
    rfw.setFireworkMeta(rfwm);

    Firework gfw = (Firework) p.getWorld()
            .spawnEntity(p.getLocation(),EntityType.FIREWORK);
    FireworkMeta gfwm = gfw.getFireworkMeta();
    FireworkEffect.Type gtype = FireworkEffect.Type.BALL_LARGE;
    FireworkEffect geffect = (FireworkEffect.builder().trail(false)
            .withColor(Color.LIME).flicker(false).with(gtype).build());
    gfwm.addEffect(geffect);
    gfwm.setPower(0);
    gfw.setFireworkMeta(gfwm);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号