Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.entity.Entity Interface Reference
Inheritance diagram for org.bukkit.entity.Entity:
org.bukkit.metadata.Metadatable org.bukkit.entity.ComplexEntityPart org.bukkit.entity.Damageable org.bukkit.entity.EnderCrystal org.bukkit.entity.EnderSignal org.bukkit.entity.ExperienceOrb org.bukkit.entity.Explosive org.bukkit.entity.FallingBlock org.bukkit.entity.Firework org.bukkit.entity.Hanging org.bukkit.entity.Item org.bukkit.entity.LivingEntity org.bukkit.entity.Projectile org.bukkit.entity.Vehicle org.bukkit.entity.Weather

Public Member Functions

Location getLocation ()
 
Location getLocation (Location loc)
 
void setVelocity (Vector velocity)
 
Vector getVelocity ()
 
boolean isOnGround ()
 
World getWorld ()
 
boolean teleport (Location location)
 
boolean teleport (Location location, TeleportCause cause)
 
boolean teleport (Entity destination)
 
boolean teleport (Entity destination, TeleportCause cause)
 
List< org.bukkit.entity.EntitygetNearbyEntities (double x, double y, double z)
 
int getEntityId ()
 
int getFireTicks ()
 
int getMaxFireTicks ()
 
void setFireTicks (int ticks)
 
void remove ()
 
boolean isDead ()
 
boolean isValid ()
 
Server getServer ()
 
abstract Entity getPassenger ()
 
abstract boolean setPassenger (Entity passenger)
 
abstract boolean isEmpty ()
 
abstract boolean eject ()
 
float getFallDistance ()
 
void setFallDistance (float distance)
 
void setLastDamageCause (EntityDamageEvent event)
 
EntityDamageEvent getLastDamageCause ()
 
UUID getUniqueId ()
 
int getTicksLived ()
 
void setTicksLived (int value)
 
void playEffect (EntityEffect type)
 
EntityType getType ()
 
boolean isInsideVehicle ()
 
boolean leaveVehicle ()
 
Entity getVehicle ()
 

Detailed Description

Represents a base entity in the world

Definition at line 18 of file Entity.java.

Member Function Documentation

abstract boolean org.bukkit.entity.Entity.eject ( )
abstract

Eject any passenger.

Returns
True if there was a passenger.
int org.bukkit.entity.Entity.getEntityId ( )

Returns a unique id for this entity

Returns
Entity id
float org.bukkit.entity.Entity.getFallDistance ( )

Returns the distance this entity has fallen

Returns
The distance.
int org.bukkit.entity.Entity.getFireTicks ( )

Returns the entity's current fire ticks (ticks before the entity stops being on fire).

Returns
int fireTicks
EntityDamageEvent org.bukkit.entity.Entity.getLastDamageCause ( )

Retrieve the last EntityDamageEvent inflicted on this entity. This event may have been cancelled.

Returns
the last known EntityDamageEvent or null if hitherto unharmed
Location org.bukkit.entity.Entity.getLocation ( )

Gets the entity's current position

Returns
a new copy of Location containing the position of this entity

Referenced by org.bukkit.util.BlockIterator.BlockIterator(), and org.bukkit.event.entity.CreatureSpawnEvent.getLocation().

Location org.bukkit.entity.Entity.getLocation ( Location  loc)

Stores the entity's current position in the provided Location object.

If the provided Location is null this method does nothing and returns null.

Returns
The Location object provided or null
int org.bukkit.entity.Entity.getMaxFireTicks ( )

Returns the entity's maximum fire ticks.

Returns
int maxFireTicks
List<org.bukkit.entity.Entity> org.bukkit.entity.Entity.getNearbyEntities ( double  x,
double  y,
double  z 
)

Returns a list of entities within a bounding box centered around this entity

Parameters
x1/2 the size of the box along x axis
y1/2 the size of the box along y axis
z1/2 the size of the box along z axis
Returns
List<Entity> List of entities nearby
abstract Entity org.bukkit.entity.Entity.getPassenger ( )
abstract

Gets the primary passenger of a vehicle. For vehicles that could have multiple passengers, this will only return the primary passenger.

Returns
an entity
Server org.bukkit.entity.Entity.getServer ( )

Gets the Server that contains this Entity

Returns
Server instance running this Entity
int org.bukkit.entity.Entity.getTicksLived ( )

Gets the amount of ticks this entity has lived for.

This is the equivalent to "age" in entities.

Returns
Age of entity
EntityType org.bukkit.entity.Entity.getType ( )

Get the type of the entity.

Returns
The entity type.

Referenced by org.bukkit.event.entity.EntityEvent.getEntityType().

UUID org.bukkit.entity.Entity.getUniqueId ( )

Returns a unique and persistent id for this entity

Returns
unique id
Entity org.bukkit.entity.Entity.getVehicle ( )

Get the vehicle that this player is inside. If there is no vehicle, null will be returned.

Returns
The current vehicle.
Vector org.bukkit.entity.Entity.getVelocity ( )

Gets this entity's current velocity

Returns
Current travelling velocity of this entity

Implemented in org.bukkit.entity.Vehicle.

World org.bukkit.entity.Entity.getWorld ( )

Gets the current world this entity resides in

Returns
World

Referenced by org.bukkit.inventory.InventoryView.setItem().

boolean org.bukkit.entity.Entity.isDead ( )

Returns true if this entity has been marked for removal.

Returns
True if it is dead.
abstract boolean org.bukkit.entity.Entity.isEmpty ( )
abstract

Check if a vehicle has passengers.

Returns
True if the vehicle has no passengers.
boolean org.bukkit.entity.Entity.isInsideVehicle ( )

Returns whether this entity is inside a vehicle.

Returns
True if the entity is in a vehicle.
boolean org.bukkit.entity.Entity.isOnGround ( )

Returns true if the entity is supported by a block. This value is a state updated by the server and is not recalculated unless the entity moves.

Returns
True if entity is on ground.

Implemented in org.bukkit.entity.Player.

boolean org.bukkit.entity.Entity.isValid ( )

Returns false if the entity has died or been despawned for some other reason.

Returns
True if valid.
boolean org.bukkit.entity.Entity.leaveVehicle ( )

Leave the current vehicle. If the entity is currently in a vehicle (and is removed from it), true will be returned, otherwise false will be returned.

Returns
True if the entity was in a vehicle.
void org.bukkit.entity.Entity.playEffect ( EntityEffect  type)

Performs the specified EntityEffect for this entity.

This will be viewable to all players near the entity.

Parameters
typeEffect to play.
void org.bukkit.entity.Entity.remove ( )

Mark the entity's removal.

void org.bukkit.entity.Entity.setFallDistance ( float  distance)

Sets the fall distance for this entity

Parameters
distanceThe new distance.
void org.bukkit.entity.Entity.setFireTicks ( int  ticks)

Sets the entity's current fire ticks (ticks before the entity stops being on fire).

Parameters
ticksCurrent ticks remaining
void org.bukkit.entity.Entity.setLastDamageCause ( EntityDamageEvent  event)

Record the last EntityDamageEvent inflicted on this entity

Parameters
eventa EntityDamageEvent
abstract boolean org.bukkit.entity.Entity.setPassenger ( Entity  passenger)
abstract

Set the passenger of a vehicle.

Parameters
passengerThe new passenger.
Returns
false if it could not be done for whatever reason
void org.bukkit.entity.Entity.setTicksLived ( int  value)

Sets the amount of ticks this entity has lived for.

This is the equivalent to "age" in entities. May not be less than one tick.

Parameters
valueAge of entity
void org.bukkit.entity.Entity.setVelocity ( Vector  velocity)

Sets this entity's velocity

Parameters
velocityNew velocity to travel with

Implemented in org.bukkit.entity.Vehicle.

boolean org.bukkit.entity.Entity.teleport ( Location  location)

Teleports this entity to the given location

Parameters
locationNew location to teleport this entity to
Returns
true if the teleport was successful
boolean org.bukkit.entity.Entity.teleport ( Location  location,
TeleportCause  cause 
)

Teleports this entity to the given location

Parameters
locationNew location to teleport this entity to
causeThe cause of this teleportation
Returns
true if the teleport was successful
boolean org.bukkit.entity.Entity.teleport ( Entity  destination)

Teleports this entity to the target Entity

Parameters
destinationEntity to teleport this entity to
Returns
true if the teleport was successful
boolean org.bukkit.entity.Entity.teleport ( Entity  destination,
TeleportCause  cause 
)

Teleports this entity to the target Entity

Parameters
destinationEntity to teleport this entity to
causeThe cause of this teleportation
Returns
true if the teleport was successful

The documentation for this interface was generated from the following file: