Package org.spout.vanilla.event.entity

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


  /**
   * Called when the resources.entities' health hits zero and is considered "dead" by Vanilla game standards
   */
  private void onDeath() {
    EntityDeathEvent event;
    Entity owner = getOwner();
    if (owner instanceof Player) {
      event = new PlayerDeathEvent((Player) owner, lastDamageCause, lastDamager);
    } else {
      event = new EntityDeathEvent(owner, lastDamageCause, lastDamager);
    }
    if (!getEngine().getEventManager().callEvent(event).isCancelled()) {
      if (!(owner instanceof Player)) {
        owner.remove();
      }
View Full Code Here

TOP

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

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.