use of gg.projecteden.nexus.features.events.y2020.halloween20.quest.Gate in project Nexus by ProjectEdenGG.
the class Halloween20 method onEnterGateRegion.
@EventHandler
public void onEnterGateRegion(PlayerEnteredRegionEvent event) {
if (!event.getRegion().getId().equalsIgnoreCase(region + "_gate_open"))
return;
Halloween20User user = new Halloween20Service().get(event.getPlayer());
if (user.getCombinationStage() != QuestStage.Combination.NOT_STARTED)
return;
Gate gate = new Gate(event.getPlayer());
gate.open();
Tasks.wait(TickTime.SECOND.x(4), gate::teleportIn);
Tasks.wait(TickTime.SECOND.x(5), gate::close);
Tasks.wait(TickTime.SECOND.x(8), () -> PlayerUtils.send(event.getPlayer(), "&7&oYou enter the land of the dead, and the large gate shuts behind you. You try to open it, but it appears to be locked."));
Tasks.wait(TickTime.SECOND.x(14), () -> QuestNPC.DIEGO.sendScript(event.getPlayer()));
Tasks.wait(TickTime.SECOND.x(15) + 300, () -> sendInstructions(event.getPlayer()));
}
use of gg.projecteden.nexus.features.events.y2020.halloween20.quest.Gate in project Nexus by ProjectEdenGG.
the class CombinationLockProvider method complete.
public void complete(Player player) {
player.closeInventory();
Halloween20Service service = new Halloween20Service();
Halloween20User user = service.get(player);
Gate gate = new Gate(player);
if (user.getCombinationStage() == QuestStage.Combination.COMPLETE) {
gate.open();
Tasks.wait(TickTime.SECOND.x(4), gate::teleportOut);
return;
}
gate.teleportIn();
player.playSound(player.getLocation(), Sound.BLOCK_BEACON_ACTIVATE, 1f, 1f);
PlayerUtils.send(player, "&7&oThe gate opens before you. You can now leave the land of the dead.");
Tasks.wait(TickTime.SECOND.x(1), gate::open);
Tasks.wait(TickTime.SECOND.x(4), gate::teleportOut);
user.setCombinationStage(QuestStage.Combination.COMPLETE);
service.save(user);
Tasks.wait(TickTime.SECOND.x(6), () -> {
PlayerUtils.send(player, Halloween20.PREFIX + "To return to the land of the dead to continue exploring, simply use &c/halloween20 &3to be teleported inside of the gate.");
Tasks.wait(TickTime.SECOND.x(5), () -> {
new BankerService().deposit(player, 10000, ShopGroup.SURVIVAL, TransactionCause.EVENT);
PlayerUtils.send(player, "&a$10,000 has been added to your account.");
// new MysteryChest(player).give(2, RewardChestType.MYSTERY);
});
});
}
use of gg.projecteden.nexus.features.events.y2020.halloween20.quest.Gate in project Nexus by ProjectEdenGG.
the class Halloween20Command method tp.
@Path
void tp() {
player().resetPlayerTime();
Halloween20User user = new Halloween20Service().get(player());
if (user.getCombinationStage() == QuestStage.Combination.NOT_STARTED)
Halloween20.start(player());
else
new Gate(player()).teleportIn();
}
Aggregations