Search in sources :

Example 1 with QuestCompleteEvent

use of com.magmaguy.elitemobs.api.QuestCompleteEvent in project EliteMobs by MagmaGuy.

the class Quest method completeQuest.

public static Quest completeQuest(UUID questUUID, Player player) {
    Quest quest = PlayerData.getQuest(player.getUniqueId(), questUUID);
    if (quest == null)
        return null;
    if (!quest.getQuestID().equals(questUUID))
        return null;
    if (!quest.getQuestObjectives().isOver())
        return null;
    QuestCompleteEvent questCompleteEvent = new QuestCompleteEvent(player, quest);
    new EventCaller(questCompleteEvent);
    return quest;
}
Also used : QuestCompleteEvent(com.magmaguy.elitemobs.api.QuestCompleteEvent) EventCaller(com.magmaguy.elitemobs.utils.EventCaller)

Aggregations

QuestCompleteEvent (com.magmaguy.elitemobs.api.QuestCompleteEvent)1 EventCaller (com.magmaguy.elitemobs.utils.EventCaller)1