public static enum EntityTargetEvent.TargetReason extends Enum<EntityTargetEvent.TargetReason>
| Enum Constant and Description | 
|---|
| CLOSEST_PLAYERWhen the entity doesn't have a target, so it attacks the nearest
 player | 
| COLLISIONWhen an entity targets another entity after colliding with it. | 
| CUSTOMFor custom calls to the event. | 
| DEFEND_VILLAGEWhen an entity selects a target while defending a village. | 
| FORGOT_TARGETWhen the target is forgotten for whatever reason. | 
| OWNER_ATTACKED_TARGETWhen the owner of the entity attacks the target attacks, so the
 entity targets it. | 
| PIG_ZOMBIE_TARGETWhen the target attacks a fellow pig zombie, so the whole group
 will target him with this reason. | 
| RANDOM_TARGETWhen the entity has no target, so the entity randomly chooses one. | 
| REINFORCEMENT_TARGETWhen a zombie targeting an entity summons reinforcements, so the reinforcements target the same entity | 
| TARGET_ATTACKED_ENTITYWhen the target attacks the entity, so entity targets it | 
| TARGET_ATTACKED_NEARBY_ENTITYWhen the target attacks a nearby entity of the same type, so the entity targets it | 
| TARGET_ATTACKED_OWNERWhen the target attacks the owner of the entity, so the entity
 targets it. | 
| TARGET_DIEDWhen the entity's target has died, and so it no longer targets it | 
| Modifier and Type | Method and Description | 
|---|---|
| static EntityTargetEvent.TargetReason | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static EntityTargetEvent.TargetReason[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final EntityTargetEvent.TargetReason TARGET_DIED
public static final EntityTargetEvent.TargetReason CLOSEST_PLAYER
public static final EntityTargetEvent.TargetReason TARGET_ATTACKED_ENTITY
public static final EntityTargetEvent.TargetReason PIG_ZOMBIE_TARGET
public static final EntityTargetEvent.TargetReason FORGOT_TARGET
Currently only occurs in with spiders when there is a high brightness.
public static final EntityTargetEvent.TargetReason TARGET_ATTACKED_OWNER
public static final EntityTargetEvent.TargetReason OWNER_ATTACKED_TARGET
public static final EntityTargetEvent.TargetReason RANDOM_TARGET
public static final EntityTargetEvent.TargetReason DEFEND_VILLAGE
public static final EntityTargetEvent.TargetReason TARGET_ATTACKED_NEARBY_ENTITY
public static final EntityTargetEvent.TargetReason REINFORCEMENT_TARGET
public static final EntityTargetEvent.TargetReason COLLISION
public static final EntityTargetEvent.TargetReason CUSTOM
public static EntityTargetEvent.TargetReason[] values()
for (EntityTargetEvent.TargetReason c : EntityTargetEvent.TargetReason.values()) System.out.println(c);
public static EntityTargetEvent.TargetReason valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2014. All rights reserved.