Finish converting most of the undeprecated api to jspecify
This commit is contained in:
parent
29a25df60e
commit
0adf5876db
45 changed files with 782 additions and 718 deletions
|
@ -24,11 +24,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+import org.bukkit.potion.PotionEffect;
|
||||
+import org.bukkit.potion.PotionEffectType;
|
||||
+import org.jetbrains.annotations.Contract;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+/**
|
||||
+ * Represents a {@link PotionEffectType} paired with a duration.
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public sealed interface SuspiciousEffectEntry permits SuspiciousEffectEntryImpl {
|
||||
+
|
||||
+ /**
|
||||
|
@ -36,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @return effect type
|
||||
+ */
|
||||
+ @NotNull PotionEffectType effect();
|
||||
+ PotionEffectType effect();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the duration for this effect instance.
|
||||
|
@ -53,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @return new instance of an entry
|
||||
+ */
|
||||
+ @Contract(value = "_, _ -> new", pure = true)
|
||||
+ static @NotNull SuspiciousEffectEntry create(final @NotNull PotionEffectType effectType, final int duration) {
|
||||
+ static SuspiciousEffectEntry create(final PotionEffectType effectType, final int duration) {
|
||||
+ return new SuspiciousEffectEntryImpl(effectType, duration);
|
||||
+ }
|
||||
+}
|
||||
|
@ -66,9 +67,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+package io.papermc.paper.potion;
|
||||
+
|
||||
+import org.bukkit.potion.PotionEffectType;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+
|
||||
+record SuspiciousEffectEntryImpl(@NotNull PotionEffectType effect, int duration) implements SuspiciousEffectEntry {
|
||||
+@ApiStatus.Internal
|
||||
+@NullMarked
|
||||
+record SuspiciousEffectEntryImpl(PotionEffectType effect, int duration) implements SuspiciousEffectEntry {
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue