Swap some nullable annotations (#9696)
This commit is contained in:
parent
1c15111f08
commit
eea0c649ca
9 changed files with 186 additions and 72 deletions
|
@ -6,16 +6,17 @@ 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..9022f697ab244df43074e48c9150f39d44217531
|
||||
index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476baf2daf05
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -0,0 +1,33 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.entity.EntityType;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
|
@ -26,6 +27,7 @@ index 0000000000000000000000000000000000000000..9022f697ab244df43074e48c9150f39d
|
|||
+public class PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
|
||||
+ @NotNull private final Entity entity;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PhantomPreSpawnEvent(@NotNull Location location, @NotNull Entity entity, @NotNull CreatureSpawnEvent.SpawnReason reason) {
|
||||
+ super(location, EntityType.PHANTOM, reason);
|
||||
+ this.entity = entity;
|
||||
|
@ -36,7 +38,7 @@ index 0000000000000000000000000000000000000000..9022f697ab244df43074e48c9150f39d
|
|||
+ *
|
||||
+ * @return Entity
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public Entity getSpawningEntity() {
|
||||
+ return entity;
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue