[Bleeding] Call EntityTargetEvent in many new places.

Adds BUKKIT-5388, BUKKIT-5387, BUKKIT-5386, BUKKIT-5483, BUKKIT-5484.
Fixes BUKKIT-5389.
This commit is contained in:
GJ
2014-02-05 11:56:37 -05:00
committed by Travis Watkins
parent 3abba82315
commit 890a4af12f
6 changed files with 48 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
package net.minecraft.server;
import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit
public class PathfinderGoalOcelotAttack extends PathfinderGoal {
World a;
@@ -29,6 +31,10 @@ public class PathfinderGoalOcelotAttack extends PathfinderGoal {
}
public void d() {
// CraftBukkit start
EntityTargetEvent.TargetReason reason = this.c.isAlive() ? EntityTargetEvent.TargetReason.FORGOT_TARGET : EntityTargetEvent.TargetReason.TARGET_DIED;
org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetEvent(this.c, null, reason);
// CraftBukkit end
this.c = null;
this.b.getNavigation().h();
}