Package org.spout.vanilla.event.entity

Examples of org.spout.vanilla.event.entity.EntityHealEvent


   */
  public void heal(float amount, HealCause cause) {
    if (!VanillaConfiguration.PLAYER_SURVIVAL_ENABLE_HEALTH.getBoolean()) {
      return;
    }
    EntityHealEvent event = new EntityHealEvent(getOwner(), amount, cause);
    EntityHealEvent healEvent = getOwner().getEngine().getEventManager().callEvent(event);
    if (!healEvent.isCancelled()) {
      setHealth(getHealth() + event.getHealAmount(), HealthChangeCause.HEAL);
    }
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.event.entity.EntityHealEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.