[Bleeding] Added new target events. Fixes BUKKIT-935

This commit is contained in:
feildmaster
2012-03-09 15:40:59 -06:00
committed by EvilSeph
parent a967d6e371
commit 77ef051095
7 changed files with 59 additions and 35 deletions

View File

@@ -1,5 +1,7 @@
package net.minecraft.server;
import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit
public class PathfinderGoalMeleeAttack extends PathfinderGoal {
World a;
@@ -52,6 +54,10 @@ public class PathfinderGoalMeleeAttack 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(b, null, reason);
// CraftBukkit end
this.c = null;
this.b.ak().f();
}