/* * Copyright (c) 2018 univento.eu - All rights reserved * You are not allowed to use, distribute or modify this code */ package eu.univento.core.api.quest; import eu.univento.core.Core; import eu.univento.core.api.player.CustomPlayer; import io.vertx.core.json.JsonObject; import lombok.Getter; import java.util.List; @Getter public class Quest { private String name; private String description; private QuestRequirement requirement; private QuestRewardType reward; private List tasks; public Quest(String name) { this.name = name; Core.getCommons().getDatabaseManager().getMongoDB().getClient().findOne("quests", new JsonObject().put("name", name), null, event -> { if(event.failed()) event.cause().printStackTrace(); this.description = event.result().getString("description"); }); } public void start(CustomPlayer player) { } }