mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
#601: Add Block#isPreferredTool
This commit is contained in:
parent
8dcc25417d
commit
2b8fb83fd8
1 changed files with 11 additions and 0 deletions
|
@ -430,6 +430,17 @@ public interface Block extends Metadatable {
|
||||||
@NotNull
|
@NotNull
|
||||||
Collection<ItemStack> getDrops(@NotNull ItemStack tool, @Nullable Entity entity);
|
Collection<ItemStack> getDrops(@NotNull ItemStack tool, @Nullable Entity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the given item is a preferred choice to break this Block.
|
||||||
|
*
|
||||||
|
* In some cases this determines if a block will drop anything or extra
|
||||||
|
* loot.
|
||||||
|
*
|
||||||
|
* @param tool The tool or item used for breaking this block
|
||||||
|
* @return true if the tool is preferred for breaking this block.
|
||||||
|
*/
|
||||||
|
boolean isPreferredTool(@NotNull ItemStack tool);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if this block is passable.
|
* Checks if this block is passable.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue