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 29a25df60e
commit 0adf5876db
45 changed files with 782 additions and 718 deletions

View File

@@ -13,12 +13,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+package io.papermc.paper.entity;
+
+import org.bukkit.entity.Entity;
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
+/**
+ * Represents an entity that can be leashed.
+ */
+@NullMarked
+public interface Leashable extends Entity {
+
+ /**
@@ -34,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @return the entity holding the leash
+ * @throws IllegalStateException if not currently leashed
+ */
+ @NonNull Entity getLeashHolder() throws IllegalStateException;
+ Entity getLeashHolder() throws IllegalStateException;
+
+ /**
+ * Sets the leash on this entity to be held by the supplied entity.