A new event EntityDamageByProjectileEvent was created. EntityDamageByProjectileEvent adds the ability to get the projectile entity (such as an egg) and also set if the projectile 'bounces'. New interfaces were created to facilitate all kinds of projectile entities. Changes were made to facilitate the new event, and enable other events, for plugins and event listeners.
46 lines
940 B
Java
46 lines
940 B
Java
|
|
package org.bukkit.entity;
|
|
|
|
import org.bukkit.Location;
|
|
import org.bukkit.World;
|
|
|
|
/**
|
|
* Represents a base entity in the world
|
|
*/
|
|
public interface Entity {
|
|
/**
|
|
* Gets the entity's current position
|
|
*
|
|
* @return Location containing the position of this entity
|
|
*/
|
|
public Location getLocation();
|
|
|
|
/**
|
|
* Gets the current world this entity resides in
|
|
*
|
|
* @return World
|
|
*/
|
|
public World getWorld();
|
|
|
|
/**
|
|
* Teleports this entity to the given location
|
|
*
|
|
* @param location New location to teleport this entity to
|
|
*/
|
|
public void teleportTo(Location location);
|
|
|
|
/**
|
|
* Teleports this entity to the target Entity
|
|
*
|
|
* @param destination Entity to teleport this entity to
|
|
*/
|
|
public void teleportTo(Entity destination);
|
|
|
|
/**
|
|
* Returns a unique id for this entity
|
|
*
|
|
* @return Entity id
|
|
*/
|
|
public int getEntityId();
|
|
}
|