Non-fragile blocks broken with the wrong tool do not drop despite drop-on-delete:true
Psithief opened this issue ยท 4 comments
Example: Stone brick field. Broken with a pickaxe, fine. Broken with hands - no drop.
You may have to cancel the event and then call block.breakNaturally()
to prevent this loss of fields - or worse consider all blocks as fragile.
The else statement here doesn't check what the event is going to drop because Bukkit doesn't include that in its event...
private void removeAndRefundBlock(Player player, Block block, Field field, BlockBreakEvent event)
{
PreciousStones.debug("releasing field");
if (plugin.getSettingsManager().isFragileBlock(block))
{
PreciousStones.debug("fragile block broken");
event.setCancelled(true);
plugin.getForceFieldManager().release(block);
}
else
{
plugin.getForceFieldManager().silentRelease(block);
event.setCancelled(false);
}
Convincing players not to break their fields with their hands when they want to move them is a battle that I can't win.
@phaed420 What version? The problem persists through v9.1.2 and v9.1.3 is still not available from dev.bukkit.org files. (I know you linked it in the comments but that's not fair - it's already on the 2nd page.)