Swap some nullable annotations (#9696)

This commit is contained in:
Lulu13022002
2023-09-14 12:44:12 +02:00
parent 11f2c20c6a
commit abbdae4f53
9 changed files with 171 additions and 57 deletions

View File

@@ -16,6 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+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..00000000000000000000000000000000
+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..00000000000000000000000000000000
+ *
+ * @return Entity
+ */
+ @Nullable
+ @NotNull
+ public Entity getSpawningEntity() {
+ return entity;
+ }