Search in sources :

Example 1 with EliteMobHealEvent

use of com.magmaguy.elitemobs.api.EliteMobHealEvent 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();
}
Also used : EventCaller(com.magmaguy.elitemobs.utils.EventCaller) EliteMobHealEvent(com.magmaguy.elitemobs.api.EliteMobHealEvent)

Example 2 with EliteMobHealEvent

use of com.magmaguy.elitemobs.api.EliteMobHealEvent 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);
}
Also used : EventCaller(com.magmaguy.elitemobs.utils.EventCaller) EliteMobHealEvent(com.magmaguy.elitemobs.api.EliteMobHealEvent)

Aggregations

EliteMobHealEvent (com.magmaguy.elitemobs.api.EliteMobHealEvent)2 EventCaller (com.magmaguy.elitemobs.utils.EventCaller)2