EntityPathfindEvent should be an EntityEvent

This commit is contained in:
Aikar 2018-06-25 22:09:11 -04:00
parent ffcba0f43c
commit ae79aa3436
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
1 changed files with 7 additions and 8 deletions

View File

@ -1,4 +1,4 @@
From 96bfcbd08007feae7b996d708c15a485ce665494 Mon Sep 17 00:00:00 2001
From 93eda7e71ee827d84d3d670f01d6c25388e7578f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 21:15:34 -0400
Subject: [PATCH] EntityPathfindEvent
@ -7,17 +7,17 @@ Fires when an Entity decides to start moving to a location.
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
new file mode 100644
index 0000000..21cab26
index 00000000..0e4902d9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
@@ -0,0 +1,75 @@
@@ -0,0 +1,74 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.Location;
+import org.bukkit.entity.Entity;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+
+/**
+ * Fired when an Entity decides to start moving towards a location.
@ -25,12 +25,11 @@ index 0000000..21cab26
+ * This event does not fire for the entities actual movement. Only when it
+ * is choosing to start moving to a location.
+ */
+public class EntityPathfindEvent extends Event implements Cancellable {
+ private final Entity entity;
+public class EntityPathfindEvent extends EntityEvent implements Cancellable {
+ private final Entity targetEntity;
+ private final Location loc;
+ public EntityPathfindEvent(Entity entity, Location loc, Entity targetEntity) {
+ this.entity = entity;
+ super(entity);
+ this.targetEntity = targetEntity;
+ this.loc = loc;
+ }
@ -87,5 +86,5 @@ index 0000000..21cab26
+ }
+}
--
2.9.2.windows.1
2.18.0