All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bukkit.event.entity.EntityEvent Maven / Gradle / Ivy

package org.bukkit.event.entity;

import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.Event;

/**
 * Represents an Entity-related event
 */
public abstract class EntityEvent extends Event {
  protected Entity entity;

  public EntityEvent(final Entity what) {
    entity = what;
  }

  /**
   * Returns the Entity involved in this event
   *
   * @return Entity who is involved in this event
   */
  public Entity getEntity() {
    return entity;
  }

  /**
   * Gets the EntityType of the Entity involved in this event.
   *
   * @return EntityType of the Entity involved in this event
   */
  public EntityType getEntityType() {
    return entity.getType();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy