diff options
author | Lulu13022002 <[email protected]> | 2024-06-24 00:42:44 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-06-24 00:42:44 +0200 |
commit | b99d071a362bbfd708f5aa09318546f6dd1874c6 (patch) | |
tree | 33d81c87c0fced3a15cf653125385acb237afca4 /patches/api/0166-Fix-Spigot-annotation-mistakes.patch | |
parent | 1d3fc0ee68be1672780a2c65d1814b52d412a070 (diff) | |
download | Paper-b99d071a362bbfd708f5aa09318546f6dd1874c6.tar.gz Paper-b99d071a362bbfd708f5aa09318546f6dd1874c6.zip |
Swap some nullable annotations (#10960)
Diffstat (limited to 'patches/api/0166-Fix-Spigot-annotation-mistakes.patch')
-rw-r--r-- | patches/api/0166-Fix-Spigot-annotation-mistakes.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch index 05a3f639e4..9ff09f5aa8 100644 --- a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch @@ -795,6 +795,19 @@ index 4047f026ab796eca7ad2d6718e1436f251c08e93..d248069adfc67eb840951f7ab4a1fa5d @Contract("null -> null") @Nullable public static EntityType fromName(@Nullable String name) { +diff --git a/src/main/java/org/bukkit/entity/ItemDisplay.java b/src/main/java/org/bukkit/entity/ItemDisplay.java +index bd718c1cf6f20cd716d2fac11556437b4a5aab2e..586ac8abbd1a0f2724fdfadc01370cb6f1c1067a 100644 +--- a/src/main/java/org/bukkit/entity/ItemDisplay.java ++++ b/src/main/java/org/bukkit/entity/ItemDisplay.java +@@ -14,7 +14,7 @@ public interface ItemDisplay extends Display { + * + * @return the displayed item stack + */ +- @Nullable ++ @NotNull // Paper + ItemStack getItemStack(); + + /** diff --git a/src/main/java/org/bukkit/entity/LightningStrike.java b/src/main/java/org/bukkit/entity/LightningStrike.java index b27447d7a2833f84cf05946c851f5b6740a578e3..5afeb2f6c82e8f752229462c2d7846f6ae7a4b44 100644 --- a/src/main/java/org/bukkit/entity/LightningStrike.java @@ -886,6 +899,19 @@ index 95c79c5fa0c4e30201f887da6467ce5f81c8a255..7f9c4d4b430a3f0276461346ff2621ba public MaterialData getDisplayBlock(); /** +diff --git a/src/main/java/org/bukkit/entity/OminousItemSpawner.java b/src/main/java/org/bukkit/entity/OminousItemSpawner.java +index 60522888bc320ba0a55655532e19185fac816bd1..4aa07d4edb2c81d0ae7999b30ad53ff8bb884ec7 100644 +--- a/src/main/java/org/bukkit/entity/OminousItemSpawner.java ++++ b/src/main/java/org/bukkit/entity/OminousItemSpawner.java +@@ -15,7 +15,7 @@ public interface OminousItemSpawner extends Entity { + * + * @return the item + */ +- @Nullable ++ @org.jetbrains.annotations.NotNull // Paper + ItemStack getItem(); + + /** diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index dc9829ab0f4efcf9534f1b2d4a2e48ea49e8d372..e65f4f0df2e6832cf089572822c96ecc7a83dab3 100644 --- a/src/main/java/org/bukkit/entity/Player.java @@ -939,6 +965,29 @@ index 9cb08fe7201a9f91e88c7b1ee22c17889a7bf1c3..c0fcfccdf476106b48e626a099658c04 -@Deprecated +@Deprecated(forRemoval = true) // Paper public interface SplashPotion extends ThrownPotion { } +diff --git a/src/main/java/org/bukkit/entity/ZombieVillager.java b/src/main/java/org/bukkit/entity/ZombieVillager.java +index 7cc1d9a966454af70b7c25735fe474fe3eb97eb4..e38f38ebfc6e85f29b09c4bb3e2ea79639078ad0 100644 +--- a/src/main/java/org/bukkit/entity/ZombieVillager.java ++++ b/src/main/java/org/bukkit/entity/ZombieVillager.java +@@ -13,15 +13,15 @@ public interface ZombieVillager extends Zombie { + * Sets the villager profession of this zombie. + */ + @Override +- void setVillagerProfession(@Nullable Villager.Profession profession); ++ void setVillagerProfession(@NotNull Villager.Profession profession); // Paper + + /** + * Returns the villager profession of this zombie. + * +- * @return the profession or null ++ * @return the profession + */ + @Override +- @Nullable ++ @NotNull // Paper + Villager.Profession getVillagerProfession(); + + /** diff --git a/src/main/java/org/bukkit/entity/memory/MemoryKey.java b/src/main/java/org/bukkit/entity/memory/MemoryKey.java index 8f601e85df580ef8106eaff8b9eafb5691a4874b..d615c006c9153fb65024241604b744fbfc383efc 100644 --- a/src/main/java/org/bukkit/entity/memory/MemoryKey.java |