From f8ce884be6818a77e2952d54924be27324a2c3a3 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 3 Jun 2020 19:25:33 +1000 Subject: [PATCH] SPIGOT-5751: Clarify behaviour of block drop-related API methods By: Lars Dormans --- paper-api/src/main/java/org/bukkit/block/Block.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/block/Block.java b/paper-api/src/main/java/org/bukkit/block/Block.java index 8a48572e92..2ff77abef2 100644 --- a/paper-api/src/main/java/org/bukkit/block/Block.java +++ b/paper-api/src/main/java/org/bukkit/block/Block.java @@ -376,7 +376,8 @@ public interface Block extends Metadatable { PistonMoveReaction getPistonMoveReaction(); /** - * Breaks the block and spawns items as if a player had digged it + * Breaks the block and spawns items as if a player had digged it regardless + * of the tool. * * @return true if the block was destroyed */ @@ -389,7 +390,7 @@ public interface Block extends Metadatable { * @param tool The tool or item in hand used for digging * @return true if the block was destroyed */ - boolean breakNaturally(@NotNull ItemStack tool); + boolean breakNaturally(@Nullable ItemStack tool); /** * Returns a list of items which would drop by destroying this block @@ -407,7 +408,7 @@ public interface Block extends Metadatable { * @return a list of dropped items for this type of block */ @NotNull - Collection getDrops(@NotNull ItemStack tool); + Collection getDrops(@Nullable ItemStack tool); /** * Returns a list of items which would drop by the entity destroying this