testserver/patches/server/0614-Add-Block-isValidTool....

21 lines
794 B
Diff
Raw Normal View History

2021-06-11 12:02:28 +00: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-11-24 20:15:19 +00:00
index 4c30b6d0d70a48b39bd99b5e9761f950b8b0c340..011f34034bf6d8481e91b08894c68d87de41f2c1 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
2021-11-24 20:15:19 +00:00
@@ -672,5 +672,9 @@ public class CraftBlock implements Block {
2021-06-11 12:02:28 +00:00
}
return speed;
}
+
+ public boolean isValidTool(ItemStack itemStack) {
+ return getDrops(itemStack).size() != 0;
+ }
// Paper end
}