mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
EntityPathfindEvent should be an EntityEvent
This commit is contained in:
parent
ea2b9ac291
commit
4342d72e74
1 changed files with 4 additions and 5 deletions
|
@ -7,7 +7,7 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
index 00000000..0e4902d9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -16,8 +16,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+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 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * 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;
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue