2020-07-06 21:46:55 +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
|
2021-03-16 14:04:28 +01:00
|
|
|
index 3372dac5b03ebe518b36a28bb4f64e7b516a2cc9..4b6cfe09c256b43ca59f9c8a52330004c198438b 100644
|
2020-07-06 21:46:55 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
|
|
@@ -794,5 +794,9 @@ public class CraftBlock implements Block {
|
|
|
|
}
|
|
|
|
return speed;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean isValidTool(ItemStack itemStack) {
|
|
|
|
+ return getDrops(itemStack).size() != 0;
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|