From 7cc795f30e3982b24069232b43ec460d59f9f3d9 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Tue, 4 Aug 2020 09:52:53 +0200 Subject: [PATCH] One more change --- .../slimefun4/implementation/listeners/BlockListener.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java index 130185aaf..65f113326 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java @@ -91,7 +91,7 @@ public class BlockListener implements Listener { int fortune = getBonusDropsWithFortune(item, e.getBlock()); List drops = new ArrayList<>(); - if (isTool(item.getType())) { + if (item.getType() != Material.AIR) { SlimefunItem tool = SlimefunItem.getByItem(item); if (tool != null) { @@ -136,11 +136,6 @@ public class BlockListener implements Listener { dropItems(e, drops); } - private boolean isTool(Material type) { - // Small performance optimization in case someone has backwards compatibility enabled. - return type == Material.SHEARS || type.name().endsWith("_AXE") || type.name().endsWith("_PICKAXE") || type.name().endsWith("_SHOVEL"); - } - private void dropItems(BlockBreakEvent e, List drops) { if (!drops.isEmpty()) { e.getBlock().setType(Material.AIR);