summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGJ <gjmcferrin@gmail.com>2014-02-08 08:32:54 -0500
committerTravis Watkins <amaranth@ubuntu.com>2014-04-18 10:35:34 -0500
commited67385edf1085469119be982ef30dd60ffd1b27 (patch)
tree40282e8bfe39887e14bd5dda2e399f4f0a3b9b73 /src
parent6bc36a917cc8f71fd188a370c834b30378fb7710 (diff)
downloadbukkit-ed67385edf1085469119be982ef30dd60ffd1b27.tar
bukkit-ed67385edf1085469119be982ef30dd60ffd1b27.tar.gz
bukkit-ed67385edf1085469119be982ef30dd60ffd1b27.tar.lz
bukkit-ed67385edf1085469119be982ef30dd60ffd1b27.tar.xz
bukkit-ed67385edf1085469119be982ef30dd60ffd1b27.zip
[Bleeding] Add new TargetReasons to EntityTargetEvent.
This commit adds three new TargetReasons to EntityTargetEvent to address missing cases where the event is not currently fired. The first, TargetReason.TARGET_ATTACKED_NEARBY_ENTITY, is used when a neutral wolf is attacked, causing all nearby wolves to turn hostile and attack the first wolf's target. The second, TargetReason.REINFORCEMENT_TARGET, is used when a zombie summons reinforcements and the new zombie targets the first zombie's target. The third, TargetReason.COLLISION, is used when an iron golem collides with a hostile entity, causing it to begin targeting the entity it collided with.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/event/entity/EntityTargetEvent.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java b/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java
index 2bcfbba7..1f7af4db 100644
--- a/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java
@@ -122,6 +122,18 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
*/
DEFEND_VILLAGE,
/**
+ * When the target attacks a nearby entity of the same type, so the entity targets it
+ */
+ TARGET_ATTACKED_NEARBY_ENTITY,
+ /**
+ * When a zombie targeting an entity summons reinforcements, so the reinforcements target the same entity
+ */
+ REINFORCEMENT_TARGET,
+ /**
+ * When an entity targets another entity after colliding with it.
+ */
+ COLLISION,
+ /**
* For custom calls to the event.
*/
CUSTOM