SPIGOT-5751: Clarify behaviour of block drop-related API methods

By: Lars Dormans <lars.dormans@live.nl>
This commit is contained in:
Bukkit/Spigot 2020-06-03 19:25:33 +10:00
parent 036d0b41dd
commit f8ce884be6

View File

@ -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<ItemStack> getDrops(@NotNull ItemStack tool);
Collection<ItemStack> getDrops(@Nullable ItemStack tool);
/**
* Returns a list of items which would drop by the entity destroying this