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

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

There is a newer version: 2.4.0
Show newest version
package org.bukkit.event.entity;

import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList;

/**
 * Called when an entity comes into contact with a portal
 */
public class EntityPortalEnterEvent extends EntityEvent {
  private static final HandlerList handlers = new HandlerList();
  private final Location location;

  public EntityPortalEnterEvent(final Entity entity, final Location location) {
    super(entity);
    this.location = location;
  }

  public static HandlerList getHandlerList() {
    return handlers;
  }

  /**
   * Gets the portal block the entity is touching
   *
   * @return The portal block the entity is touching
   */
  public Location getLocation() {
    return location;
  }

  @Override
  public HandlerList getHandlers() {
    return handlers;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy