Bukkit-API
1.7.9-R0.2
The inofficial Bukkit-API
|
Classes | |
enum | TargetReason |
Public Member Functions | |
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 () |
![]() | |
EntityEvent (final Entity what) | |
Entity | getEntity () |
EntityType | getEntityType () |
![]() | |
Event () | |
Event (boolean isAsync) | |
String | getEventName () |
abstract HandlerList | getHandlers () |
final boolean | isAsynchronous () |
Static Public Member Functions | |
static HandlerList | getHandlerList () |
Additional Inherited Members | |
![]() | |
Entity | entity |
Called when a creature targets or untargets another entity
Definition at line 10 of file EntityTargetEvent.java.
TargetReason org.bukkit.event.entity.EntityTargetEvent.getReason | ( | ) |
Returns the reason for the targeting
Definition at line 35 of file EntityTargetEvent.java.
Entity org.bukkit.event.entity.EntityTargetEvent.getTarget | ( | ) |
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.
Definition at line 47 of file EntityTargetEvent.java.
boolean org.bukkit.event.entity.EntityTargetEvent.isCancelled | ( | ) |
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
Implements org.bukkit.event.Cancellable.
Definition at line 22 of file EntityTargetEvent.java.
void org.bukkit.event.entity.EntityTargetEvent.setCancelled | ( | boolean | cancel | ) |
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
cancel | true if you wish to cancel this event |
Implements org.bukkit.event.Cancellable.
Definition at line 26 of file EntityTargetEvent.java.
void org.bukkit.event.entity.EntityTargetEvent.setTarget | ( | Entity | target | ) |
Set the entity that you want the mob to target instead.
It is possible to be null, null will cause the entity to be target-less.
This is different from cancelling the event. Cancelling the event will cause the entity to keep an original target, while setting to be null will cause the entity to be reset.
target | The entity to target |
Definition at line 63 of file EntityTargetEvent.java.