Finish converting most of the undeprecated api to jspecify

This commit is contained in:
Jake Potrebic 2024-09-30 11:44:36 -07:00
parent ba3c29b92e
commit e7e1ab56ca
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
45 changed files with 1046 additions and 982 deletions

View file

@ -16,19 +16,20 @@ Co-authored-by: TotalledZebra <Holappa57@gmail.com>
diff --git a/src/main/java/io/papermc/paper/entity/SchoolableFish.java b/src/main/java/io/papermc/paper/entity/SchoolableFish.java
new file mode 100644
index 0000000000000000000000000000000000000000..39ad7d283609d7e427a2ab35b6fad839e032fe92
index 0000000000000000000000000000000000000000..a16329a8d08c74ce58960ff9dcc0af098b8543e9
--- /dev/null
+++ b/src/main/java/io/papermc/paper/entity/SchoolableFish.java
@@ -0,0 +1,47 @@
+package io.papermc.paper.entity;
+
+import org.bukkit.entity.Fish;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
+/**
+ * Represents a fish that can school with other fish.
+ */
+@NullMarked
+public interface SchoolableFish extends Fish {
+
+ /**
@ -36,7 +37,7 @@ index 0000000000000000000000000000000000000000..39ad7d283609d7e427a2ab35b6fad839
+ *
+ * @param leader fish to follow
+ */
+ void startFollowing(@NotNull SchoolableFish leader);
+ void startFollowing(SchoolableFish leader);
+
+ /**
+ * Causes the fish to stop following their current
@ -63,8 +64,7 @@ index 0000000000000000000000000000000000000000..39ad7d283609d7e427a2ab35b6fad839
+ *
+ * @return following fish
+ */
+ @Nullable
+ SchoolableFish getSchoolLeader();
+ @Nullable SchoolableFish getSchoolLeader();
+
+}
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java