mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-23 07:19:33 +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
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
index 00000000..0e4902d9
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
|
@ -16,8 +16,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import org.bukkit.Location;
|
+import org.bukkit.Location;
|
||||||
+import org.bukkit.entity.Entity;
|
+import org.bukkit.entity.Entity;
|
||||||
+import org.bukkit.event.Cancellable;
|
+import org.bukkit.event.Cancellable;
|
||||||
+import org.bukkit.event.Event;
|
|
||||||
+import org.bukkit.event.HandlerList;
|
+import org.bukkit.event.HandlerList;
|
||||||
|
+import org.bukkit.event.entity.EntityEvent;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Fired when an Entity decides to start moving towards a location.
|
+ * 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
|
+ * This event does not fire for the entities actual movement. Only when it
|
||||||
+ * is choosing to start moving to a location.
|
+ * is choosing to start moving to a location.
|
||||||
+ */
|
+ */
|
||||||
+public class EntityPathfindEvent extends Event implements Cancellable {
|
+public class EntityPathfindEvent extends EntityEvent implements Cancellable {
|
||||||
+ private final Entity entity;
|
|
||||||
+ private final Entity targetEntity;
|
+ private final Entity targetEntity;
|
||||||
+ private final Location loc;
|
+ private final Location loc;
|
||||||
+ public EntityPathfindEvent(Entity entity, Location loc, Entity targetEntity) {
|
+ public EntityPathfindEvent(Entity entity, Location loc, Entity targetEntity) {
|
||||||
+ this.entity = entity;
|
+ super(entity);
|
||||||
+ this.targetEntity = targetEntity;
|
+ this.targetEntity = targetEntity;
|
||||||
+ this.loc = loc;
|
+ this.loc = loc;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Add table
Reference in a new issue