Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
EntityPathfindEvent should be an EntityEvent
Dieser Commit ist enthalten in:
Ursprung
ffcba0f43c
Commit
ae79aa3436
@ -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
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren