1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2020-04-17 14:59:49 +02:00
parent 1dd8cd20d9
commit eead20cb7e
2 changed files with 5 additions and 5 deletions

View File

@ -86,6 +86,7 @@
* Fixed #1807
* Fixed Coolers accepting non-Juice items
* Fixed #1813
* Fixed #1814
## Release Candidate 10 (28 Mar 2020)

View File

@ -129,11 +129,7 @@ public class BlockListener implements Listener {
SlimefunBlockHandler blockHandler = SlimefunPlugin.getRegistry().getBlockHandlers().get(sfItem.getID());
if (blockHandler != null) {
if (blockHandler.onBreak(e.getPlayer(), e.getBlock(), sfItem, UnregisterReason.PLAYER_BREAK)) {
drops.addAll(sfItem.getDrops());
BlockStorage.clearBlockInfo(e.getBlock());
}
else {
if (!blockHandler.onBreak(e.getPlayer(), e.getBlock(), sfItem, UnregisterReason.PLAYER_BREAK)) {
e.setCancelled(true);
return;
}
@ -141,6 +137,9 @@ public class BlockListener implements Listener {
else {
sfItem.callItemHandler(BlockBreakHandler.class, handler -> handler.onBlockBreak(e, item, fortune, drops));
}
drops.addAll(sfItem.getDrops());
BlockStorage.clearBlockInfo(e.getBlock());
}
if (item.getType() != Material.AIR) {