Search in sources :

Example 11 with EventCaller

use of com.magmaguy.elitemobs.utils.EventCaller in project EliteMobs by MagmaGuy.

the class Objective method progressObjective.

public void progressObjective(QuestObjectives questObjectives) {
    currentAmount++;
    if (currentAmount >= targetAmount)
        objectiveCompleted = true;
    QuestProgressionEvent questProgressionEvent = new QuestProgressionEvent(Bukkit.getPlayer(questObjectives.getQuest().getPlayerUUID()), questObjectives.getQuest(), this);
    new EventCaller(questProgressionEvent);
}
Also used : EventCaller(com.magmaguy.elitemobs.utils.EventCaller) QuestProgressionEvent(com.magmaguy.elitemobs.api.QuestProgressionEvent)

Example 12 with EventCaller

use of com.magmaguy.elitemobs.utils.EventCaller in project EliteMobs by MagmaGuy.

the class QuestObjectives method updateQuestStatus.

public void updateQuestStatus(UUID playerUUID) {
    // This would in theory only be possible for quests that display the "completed" status, but should still be inaccessible in theory.
    if (turnedIn)
        return;
    if (over)
        return;
    if (!isOver())
        return;
    over = true;
    QuestObjectivesCompletedEvent questObjectivesCompletedEvent = new QuestObjectivesCompletedEvent(Bukkit.getPlayer(playerUUID), quest);
    new EventCaller(questObjectivesCompletedEvent);
}
Also used : EventCaller(com.magmaguy.elitemobs.utils.EventCaller) QuestObjectivesCompletedEvent(com.magmaguy.elitemobs.api.QuestObjectivesCompletedEvent)

Aggregations

EventCaller (com.magmaguy.elitemobs.utils.EventCaller)12 EliteMobHealEvent (com.magmaguy.elitemobs.api.EliteMobHealEvent)2 QuestProgressionEvent (com.magmaguy.elitemobs.api.QuestProgressionEvent)2 EliteMobSpawnEvent (com.magmaguy.elitemobs.api.EliteMobSpawnEvent)1 NPCEntitySpawnEvent (com.magmaguy.elitemobs.api.NPCEntitySpawnEvent)1 QuestAcceptEvent (com.magmaguy.elitemobs.api.QuestAcceptEvent)1 QuestCompleteEvent (com.magmaguy.elitemobs.api.QuestCompleteEvent)1 QuestLeaveEvent (com.magmaguy.elitemobs.api.QuestLeaveEvent)1 QuestObjectivesCompletedEvent (com.magmaguy.elitemobs.api.QuestObjectivesCompletedEvent)1 SuperMobSpawnEvent (com.magmaguy.elitemobs.api.SuperMobSpawnEvent)1 NewMinidungeonRelativeBossLocationEvent (com.magmaguy.elitemobs.api.internal.NewMinidungeonRelativeBossLocationEvent)1 Location (org.bukkit.Location)1