[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002 2024-02-01 10:15:57 +01:00 committed by GitHub
parent b3c81089ae
commit 294347bee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
295 changed files with 3245 additions and 3088 deletions

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Add PhantomPreSpawnEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476baf2daf05
index 0000000000000000000000000000000000000000..ff7d9ff618ab821eeece6923a694a9a4eea8585d
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java
@@ -0,0 +1,33 @@
@@ -0,0 +1,32 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.Location;
@ -18,13 +18,12 @@ index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476b
+import org.bukkit.event.entity.CreatureSpawnEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+
+/**
+ * Called when a phantom is spawned for an exhausted player
+ */
+public class PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
+
+ @NotNull private final Entity entity;
+
+ @ApiStatus.Internal
@ -36,11 +35,11 @@ index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476b
+ /**
+ * Get the entity this phantom is spawning for
+ *
+ * @return Entity
+ * @return the Entity
+ */
+ @NotNull
+ public Entity getSpawningEntity() {
+ return entity;
+ return this.entity;
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Phantom.java b/src/main/java/org/bukkit/entity/Phantom.java