From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Mon, 6 Jul 2020 12:44:31 -0700 Subject: [PATCH] Add Block#isValidTool diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index aa1ef5bb1e27e8c45710299febb2d6c6b122ff15..0c27c7edad34cf9baf42d3782c5ccdb1c4bed3b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -814,5 +814,9 @@ public class CraftBlock implements Block { } return speed; } + + public boolean isValidTool(ItemStack itemStack) { + return getDrops(itemStack).size() != 0; + } // Paper end }