VictoryDances
public class VictoryDance extends Cosmetics {
public VictoryDance(String subname, int id, int cost, String permission) {
super(subname, id, cost, permission);
}
public abstract void start(GamePlayer gamePlayer);
public abstract void stop(GamePlayer gamePlayer);
}
Example.class
public class Example extends VictoryDance {
public Example() {
super("Example", 0, 100, "skywars.cosmetics.dance.example");
}
public void start(GamePlayer gamePlayer) {
Location location = gamePlayer.getLocation();
Firework firework = location.getWorld().spawn(location.clone().add(0.5D, 0.5D, 0.5D), Firework.class);
FireworkMeta fireworkMeta = firework.getFireworkMeta();
FireworkEffect fireworkEffect = FireworkEffect.builder()
.with(FireworkEffect.Type.BALL)
.withColor(Color.RED)
.withFade(Color.AQUA)
.flicker(true)
.trail(true)
.build();
fireworkMeta.setPower(1);
fireworkMeta.addEffect(fireworkEffect);
firework.setFireworkMeta(fireworkMeta);
}
public void stop(GamePlayer gamePlayer) {
//what is executed once the game end countdown is over
}
}
Last updated
Was this helpful?