Finish converting all events to jspecify annotations

This commit is contained in:
Jake Potrebic
2024-09-29 16:48:34 -07:00
parent fa97c59a4e
commit 29a25df60e
78 changed files with 757 additions and 883 deletions

View File

@@ -16,8 +16,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Mob;
+import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NullMarked;
+
+@NullMarked
+public interface RangedEntity extends Mob {
+ /**
+ * Attack the specified entity using a ranged attack.
@@ -26,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param charge How "charged" the attack is (how far back the bow was pulled for Bow attacks).
+ * This should be a value between 0 and 1, represented as targetDistance/maxDistance.
+ */
+ void rangedAttack(@NotNull LivingEntity target, float charge);
+ void rangedAttack(LivingEntity target, float charge);
+
+ /**
+ * Sets that the Entity is "charging" up an attack, by raising its hands
@@ -44,7 +45,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @Deprecated(since = "1.19.2")
+ default boolean isChargingAttack() {
+ return isHandRaised();
+ return this.isHandRaised();
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/AbstractSkeleton.java b/src/main/java/org/bukkit/entity/AbstractSkeleton.java