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);
});
});
});
});
}
Aggregations