From 77a50b95dada2d73b92fdd95d674d357b64bc7d4 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Fri, 7 Oct 2022 11:51:54 -0700 Subject: [PATCH] Add Unmodifiable annotations to getDrops methods (#8440) --- ...getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/api/0398-Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch b/patches/api/0398-Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch index ff9178837..c23b7577e 100644 --- a/patches/api/0398-Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch +++ b/patches/api/0398-Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add getDrops to BlockState and isPreferredTool to BlockData diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java -index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..5be829058c41283a5d3d14776617c98c4cdaaf8e 100644 +index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..37ca7b6b0fcee8bec12026ec3715dcc47400cc11 100644 --- a/src/main/java/org/bukkit/block/BlockState.java +++ b/src/main/java/org/bukkit/block/BlockState.java @@ -233,5 +233,34 @@ public interface BlockState extends Metadatable { @@ -19,7 +19,7 @@ index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..5be829058c41283a5d3d14776617c98c + * @return an immutable list of dropped items for the block state + */ + @NotNull -+ java.util.Collection getDrops(); ++ java.util.@org.jetbrains.annotations.Unmodifiable Collection getDrops(); + + /** + * Returns an immutable list of items which would drop by destroying this block state @@ -29,7 +29,7 @@ index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..5be829058c41283a5d3d14776617c98c + * @return an immutable list of dropped items for the block state + */ + @NotNull -+ java.util.Collection getDrops(@Nullable org.bukkit.inventory.ItemStack tool); ++ java.util.@org.jetbrains.annotations.Unmodifiable Collection getDrops(@Nullable org.bukkit.inventory.ItemStack tool); + + /** + * Returns an immutable list of items which would drop by the entity destroying this @@ -40,7 +40,7 @@ index 10cbe71917bc32cca61748bcb0aa3395c554dbf8..5be829058c41283a5d3d14776617c98c + * @return an immutable list of dropped items for the block state + */ + @NotNull -+ java.util.Collection getDrops(@NotNull org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity); ++ java.util.@org.jetbrains.annotations.Unmodifiable Collection getDrops(@NotNull org.bukkit.inventory.ItemStack tool, @Nullable org.bukkit.entity.Entity entity); // Paper end } diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java