Finish converting all events to jspecify annotations

This commit is contained in:
Jake Potrebic 2024-09-29 16:48:34 -07:00
parent ea00be3aaa
commit ba3c29b92e
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
82 changed files with 977 additions and 1103 deletions

View file

@ -8,16 +8,17 @@ and to perform an attack.
diff --git a/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
new file mode 100644
index 0000000000000000000000000000000000000000..46e0e62d620def237dab44ad24708f1b93a8a1a7
index 0000000000000000000000000000000000000000..09c82908f63233febfe1e07fe756f1c39d23d44f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
@@ -0,0 +1,35 @@
@@ -0,0 +1,36 @@
+package com.destroystokyo.paper.entity;
+
+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..46e0e62d620def237dab44ad24708f1b
+ * @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..46e0e62d620def237dab44ad24708f1b
+ */
+ @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