geforkt von Mirrors/Paper
20503beee5
Messing with game time sent to the client isn't worth the trouble whenever it may be used by the client now and in the future for such a small issue. Mojang, plz fix
21 Zeilen
794 B
Diff
21 Zeilen
794 B
Diff
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
|
|
index 30b5a78a93405f3a03624ed1331670770aaa3765..974ab329f92f488aba0999cef25e3b8e7e062209 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
@@ -743,5 +743,9 @@ public class CraftBlock implements Block {
|
|
}
|
|
return speed;
|
|
}
|
|
+
|
|
+ public boolean isValidTool(ItemStack itemStack) {
|
|
+ return getDrops(itemStack).size() != 0;
|
|
+ }
|
|
// Paper end
|
|
}
|