From 68ca16f075bf6bd7a344e63673758a3712d254b8 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) --- ...d-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/api/Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch b/patches/api/Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch index 28a4a3a7c2..89d7359bb5 100644 --- a/patches/api/Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch +++ b/patches/api/Add-getDrops-to-BlockState-and-isPreferredTool-to-Bl.patch @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @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 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @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 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @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