org.bukkit.event.entity
Class EntityTargetLivingEntityEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityTargetEvent
org.bukkit.event.entity.EntityTargetLivingEntityEvent
- All Implemented Interfaces:
- Cancellable
public class EntityTargetLivingEntityEvent
- extends EntityTargetEvent
Called when an Entity targets a LivingEntity
and can only target LivingEntity's.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityTargetLivingEntityEvent
public EntityTargetLivingEntityEvent(Entity entity,
LivingEntity target,
EntityTargetEvent.TargetReason reason)
getTarget
public LivingEntity getTarget()
- Description copied from class:
EntityTargetEvent
- Get the entity that this is targeting.
This will be null in the case that the event is called when
the mob forgets its target.
- Overrides:
getTarget
in class EntityTargetEvent
- Returns:
- The entity
setTarget
public void 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
- Overrides:
setTarget
in class EntityTargetEvent
- Parameters:
target
- The entity to target
Copyright © 2013. All Rights Reserved.