1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Merge pull request #1559 from StarWishsama/patch-4

Fix #1558
This commit is contained in:
TheBusyBiscuit 2020-02-22 13:13:43 +01:00 committed by GitHub
commit db5e7e5fbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,11 +65,13 @@ public class ExplosivePickaxe extends SimpleSlimefunItem<BlockBreakHandler> impl
SlimefunBlockHandler handler = SlimefunPlugin.getRegistry().getBlockHandlers().get(sfItem.getID());
if (handler != null) {
allow = handler.onBreak(e.getPlayer(), e.getBlock(), sfItem, UnregisterReason.PLAYER_BREAK);
allow = handler.onBreak(e.getPlayer(), b, sfItem, UnregisterReason.PLAYER_BREAK);
}
if (allow) {
drops.add(BlockStorage.retrieve(e.getBlock()));
if (b.getType() == Material.AIR) {
drops.add(BlockStorage.retrieve(b));
}
}
}
else if (b.getType() == Material.PLAYER_HEAD) {