Search in sources :

Example 1 with Pugmas21User

use of gg.projecteden.nexus.models.pugmas21.Pugmas21User in project Nexus by ProjectEdenGG.

the class Intro method play.

public void play(Player player) {
    Pugmas21User user = userService.get(player);
    player.addPotionEffect(new PotionEffectBuilder(PotionEffectType.BLINDNESS).duration(90).amplifier(250).build());
    Tasks.wait(TickTime.SECOND, () -> {
        player.teleport(transitionLoc);
        Tasks.wait(TickTime.SECOND.x(2), () -> {
            player.teleport(introLoc);
            TrainBackground.start();
            TrainBackground.getChugs().add(player);
            Tasks.wait(TickTime.SECOND.x(15), () -> {
                TrainBackground.getChugs().remove(player);
                player.addPotionEffect(new PotionEffectBuilder(PotionEffectType.BLINDNESS).duration(80).amplifier(250).build());
                Tasks.wait(TickTime.SECOND, () -> {
                    player.teleport(Pugmas21.warp);
                    user.setFirstVisit(true);
                    userService.save(user);
                });
            });
        });
    });
}
Also used : Pugmas21User(gg.projecteden.nexus.models.pugmas21.Pugmas21User) PotionEffectBuilder(gg.projecteden.nexus.utils.PotionEffectBuilder)

Aggregations

Pugmas21User (gg.projecteden.nexus.models.pugmas21.Pugmas21User)1 PotionEffectBuilder (gg.projecteden.nexus.utils.PotionEffectBuilder)1