mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 00:20:44 +01:00
Add Block#isValidTool
This commit is contained in:
parent
a9cee72542
commit
53ea19c9bd
1 changed files with 4 additions and 0 deletions
|
@ -693,5 +693,9 @@ public class CraftBlock implements Block {
|
||||||
public String translationKey() {
|
public String translationKey() {
|
||||||
return this.getNMS().getBlock().getDescriptionId();
|
return this.getNMS().getBlock().getDescriptionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isValidTool(ItemStack itemStack) {
|
||||||
|
return getDrops(itemStack).size() != 0;
|
||||||
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue