2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
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
|
2023-06-13 01:51:45 +02:00
|
|
|
index 8958a54d1a9d6e9ad6ab09f3a587ba89ae2d817d..582f1c07da8edc88dda9463992bb8503fcb9e163 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
2023-06-13 01:51:45 +02:00
|
|
|
@@ -739,5 +739,9 @@ public class CraftBlock implements Block {
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
return speed;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean isValidTool(ItemStack itemStack) {
|
|
|
|
+ return getDrops(itemStack).size() != 0;
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|