use of com.magmaguy.elitemobs.utils.EventCaller 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;
}
use of com.magmaguy.elitemobs.utils.EventCaller in project EliteMobs by MagmaGuy.
the class Quest method stopPlayerQuest.
public static void stopPlayerQuest(Player player, String questID) {
if (PlayerData.getQuests(player.getUniqueId()) == null) {
player.sendMessage(QuestsConfig.getLeaveWhenNoActiveQuestsExist());
return;
}
QuestLeaveEvent questLeaveEvent = new QuestLeaveEvent(player, PlayerData.getQuest(player.getUniqueId(), questID));
new EventCaller(questLeaveEvent);
}
use of com.magmaguy.elitemobs.utils.EventCaller in project EliteMobs by MagmaGuy.
the class EliteEntity method fullHeal.
public void fullHeal() {
EliteMobHealEvent eliteMobHealEvent = new EliteMobHealEvent(this, true);
new EventCaller(eliteMobHealEvent);
if (eliteMobHealEvent.isCancelled())
return;
setHealth(this.maxHealth);
this.health = maxHealth;
damagers.clear();
}
use of com.magmaguy.elitemobs.utils.EventCaller in project EliteMobs by MagmaGuy.
the class EliteEntity method heal.
public void heal(double healAmount) {
EliteMobHealEvent eliteMobHealEvent = new EliteMobHealEvent(this, healAmount);
new EventCaller(eliteMobHealEvent);
if (eliteMobHealEvent.isCancelled())
return;
setHealth(health + healAmount);
}
use of com.magmaguy.elitemobs.utils.EventCaller in project EliteMobs by MagmaGuy.
the class EntityTracker method registerSuperMob.
// Super Mobs
public static void registerSuperMob(LivingEntity livingEntity) {
SuperMobSpawnEvent superMobSpawnEvent = new SuperMobSpawnEvent(livingEntity);
new EventCaller(superMobSpawnEvent);
if (superMobSpawnEvent.isCancelled())
return;
PersistentTagger.tagSuperMob(livingEntity);
}
Aggregations