mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #1814
This commit is contained in:
parent
1dd8cd20d9
commit
eead20cb7e
@ -86,6 +86,7 @@
|
||||
* Fixed #1807
|
||||
* Fixed Coolers accepting non-Juice items
|
||||
* Fixed #1813
|
||||
* Fixed #1814
|
||||
|
||||
## Release Candidate 10 (28 Mar 2020)
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user