Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.entity.EntityTargetLivingEntityEvent Class Reference
Inheritance diagram for org.bukkit.event.entity.EntityTargetLivingEntityEvent:
org.bukkit.event.entity.EntityTargetEvent org.bukkit.event.entity.EntityEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Public Member Functions

 EntityTargetLivingEntityEvent (final Entity entity, final LivingEntity target, final TargetReason reason)
 
LivingEntity getTarget ()
 
void setTarget (Entity target)
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityTargetEvent
 EntityTargetEvent (final Entity entity, final Entity target, final TargetReason reason)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
TargetReason getReason ()
 
Entity getTarget ()
 
void setTarget (Entity target)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityEvent
 EntityEvent (final Entity what)
 
Entity getEntity ()
 
EntityType getEntityType ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Additional Inherited Members

- Static Public Member Functions inherited from org.bukkit.event.entity.EntityTargetEvent
static HandlerList getHandlerList ()
 
- Protected Attributes inherited from org.bukkit.event.entity.EntityEvent
Entity entity
 

Detailed Description

Called when an Entity targets a LivingEntity and can only target LivingEntity's.

Definition at line 10 of file EntityTargetLivingEntityEvent.java.

Member Function Documentation

void org.bukkit.event.entity.EntityTargetLivingEntityEvent.setTarget ( Entity  target)

Set the Entity that you want the mob to target.

It is possible to be null, null will cause the entity to be target-less.

Must be a LivingEntity, or null.

Parameters
targetThe entity to target

Definition at line 29 of file EntityTargetLivingEntityEvent.java.

29  {
30  if (target == null || target instanceof LivingEntity) {
31  super.setTarget(target);
32  }
33  }

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