![]() |
Bukkit
1.4.7-R1.0
|
Represents a base entity in the world. More...
Inheritance diagram for org.bukkit.entity.Entity:
Collaboration diagram for org.bukkit.entity.Entity:Public Member Functions | |
| Location | getLocation () |
| Gets the entity's current position. | |
| Location | getLocation (Location loc) |
| Stores the entity's current position in the provided Location object. | |
| void | setVelocity (Vector velocity) |
| Sets this entity's velocity. | |
| Vector | getVelocity () |
| Gets this entity's current velocity. | |
| World | getWorld () |
| Gets the current world this entity resides in. | |
| boolean | teleport (Location location) |
| Teleports this entity to the given location. | |
| boolean | teleport (Location location, TeleportCause cause) |
| Teleports this entity to the given location. | |
| boolean | teleport (Entity destination) |
| Teleports this entity to the target Entity. | |
| boolean | teleport (Entity destination, TeleportCause cause) |
| Teleports this entity to the target Entity. | |
| List< org.bukkit.entity.Entity > | getNearbyEntities (double x, double y, double z) |
| Returns a list of entities within a bounding box centered around this entity. | |
| int | getEntityId () |
| Returns a unique id for this entity. | |
| int | getFireTicks () |
| Returns the entity's current fire ticks (ticks before the entity stops being on fire). | |
| int | getMaxFireTicks () |
| Returns the entity's maximum fire ticks. | |
| void | setFireTicks (int ticks) |
| Sets the entity's current fire ticks (ticks before the entity stops being on fire). | |
| void | remove () |
| Mark the entity's removal. | |
| boolean | isDead () |
| Returns true if this entity has been marked for removal. | |
| boolean | isValid () |
| Returns false if the entity has died or been despawned for some other reason. | |
| Server | getServer () |
| Gets the Server that contains this Entity. | |
| abstract Entity | getPassenger () |
| Gets the primary passenger of a vehicle. | |
| abstract boolean | setPassenger (Entity passenger) |
| Set the passenger of a vehicle. | |
| abstract boolean | isEmpty () |
| Check if a vehicle has passengers. | |
| abstract boolean | eject () |
| Eject any passenger. | |
| float | getFallDistance () |
| Returns the distance this entity has fallen. | |
| void | setFallDistance (float distance) |
| Sets the fall distance for this entity. | |
| void | setLastDamageCause (EntityDamageEvent event) |
| Record the last EntityDamageEvent inflicted on this entity. | |
| EntityDamageEvent | getLastDamageCause () |
| Retrieve the last EntityDamageEvent inflicted on this entity. | |
| UUID | getUniqueId () |
| Returns a unique and persistent id for this entity. | |
| int | getTicksLived () |
| Gets the amount of ticks this entity has lived for. | |
| void | setTicksLived (int value) |
| Sets the amount of ticks this entity has lived for. | |
| void | playEffect (EntityEffect type) |
| Performs the specified EntityEffect for this entity. | |
| EntityType | getType () |
| Get the type of the entity. | |
| boolean | isInsideVehicle () |
| Returns whether this entity is inside a vehicle. | |
| boolean | leaveVehicle () |
| Leave the current vehicle. | |
| Entity | getVehicle () |
| Get the vehicle that this player is inside. | |
Public Member Functions inherited from org.bukkit.metadata.Metadatable | |
| void | setMetadata (String metadataKey, MetadataValue newMetadataValue) |
| Sets a metadata value in the implementing object's metadata store. | |
| List< MetadataValue > | getMetadata (String metadataKey) |
| Returns a list of previously set metadata values from the implementing object's metadata store. | |
| boolean | hasMetadata (String metadataKey) |
| Tests to see whether the implementing object contains the given metadata value in its metadata store. | |
| void | removeMetadata (String metadataKey, Plugin owningPlugin) |
| Removes the given metadata value from the implementing object's metadata store. | |
Represents a base entity in the world.
Definition at line 18 of file Entity.java.
|
pure virtual |
Eject any passenger.
| int org.bukkit.entity.Entity.getEntityId | ( | ) |
Returns a unique id for this entity.
| float org.bukkit.entity.Entity.getFallDistance | ( | ) |
Returns the distance this entity has fallen.
| int org.bukkit.entity.Entity.getFireTicks | ( | ) |
Returns the entity's current fire ticks (ticks before the entity stops being on fire).
| EntityDamageEvent org.bukkit.entity.Entity.getLastDamageCause | ( | ) |
Retrieve the last EntityDamageEvent inflicted on this entity.
This event may have been cancelled.
| Location org.bukkit.entity.Entity.getLocation | ( | ) |
Gets the entity's current position.
Referenced by org.bukkit.util.BlockIterator.BlockIterator(), org.bukkit.command.defaults.SpawnpointCommand.execute(), org.bukkit.command.defaults.TeleportCommand.execute(), and org.bukkit.event.entity.CreatureSpawnEvent.getLocation().
| int org.bukkit.entity.Entity.getMaxFireTicks | ( | ) |
Returns the entity's maximum fire ticks.
| 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.
| x | 1/2 the size of the box along x axis |
| y | 1/2 the size of the box along y axis |
| z | 1/2 the size of the box along z axis |
|
pure virtual |
Gets the primary passenger of a vehicle.
For vehicles that could have multiple passengers, this will only return the primary passenger.
| Server org.bukkit.entity.Entity.getServer | ( | ) |
| int org.bukkit.entity.Entity.getTicksLived | ( | ) |
Gets the amount of ticks this entity has lived for.
This is the equivalent to "age" in entities.
| EntityType org.bukkit.entity.Entity.getType | ( | ) |
Get the type of the entity.
Referenced by org.bukkit.event.entity.EntityEvent.getEntityType().
| UUID org.bukkit.entity.Entity.getUniqueId | ( | ) |
Returns a unique and persistent id for this entity.
| Entity org.bukkit.entity.Entity.getVehicle | ( | ) |
Get the vehicle that this player is inside.
If there is no vehicle, null will be returned.
| Vector org.bukkit.entity.Entity.getVelocity | ( | ) |
Gets this entity's current velocity.
| World org.bukkit.entity.Entity.getWorld | ( | ) |
Gets the current world this entity resides in.
Referenced by org.bukkit.command.defaults.SpawnpointCommand.execute(), org.bukkit.command.defaults.TeleportCommand.execute(), and org.bukkit.inventory.InventoryView.setItem().
| boolean org.bukkit.entity.Entity.isDead | ( | ) |
Returns true if this entity has been marked for removal.
|
pure virtual |
Check if a vehicle has passengers.
| boolean org.bukkit.entity.Entity.isInsideVehicle | ( | ) |
Returns whether this entity is inside a vehicle.
| boolean org.bukkit.entity.Entity.isValid | ( | ) |
Returns false if the entity has died or been despawned for some other reason.
| 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.
| 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.
| type | Effect 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.
| distance | The 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).
| ticks | Current ticks remaining |
| void org.bukkit.entity.Entity.setLastDamageCause | ( | EntityDamageEvent | event | ) |
Record the last EntityDamageEvent inflicted on this entity.
| event | a EntityDamageEvent |
Referenced by org.bukkit.command.defaults.KillCommand.execute().
|
pure virtual |
Set the passenger of a vehicle.
| passenger | The new passenger. |
| 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.
| value | Age of entity |
| void org.bukkit.entity.Entity.setVelocity | ( | Vector | velocity | ) |
Sets this entity's velocity.
| velocity | New velocity to travel with |
| boolean org.bukkit.entity.Entity.teleport | ( | Location | location | ) |
Teleports this entity to the given location.
| location | New location to teleport this entity to |
true if the teleport was successful Referenced by org.bukkit.command.defaults.TeleportCommand.execute().
| boolean org.bukkit.entity.Entity.teleport | ( | Location | location, |
| TeleportCause | cause | ||
| ) |
Teleports this entity to the given location.
| location | New location to teleport this entity to |
| cause | The cause of this teleportation |
true if the teleport was successful | boolean org.bukkit.entity.Entity.teleport | ( | Entity | destination | ) |
| boolean org.bukkit.entity.Entity.teleport | ( | Entity | destination, |
| TeleportCause | cause | ||
| ) |