Remove block before dropping the item so it does not get pushed away

master
Alexander B 4 years ago
parent fd942d7d88
commit b61cbeb350

@ -100,6 +100,7 @@ public class OnBlockBreak implements Listener {
bsm.setDisplayName(dropConfig.getString("item.name").replace("{mob-type}", cs.getSpawnedType().name())); bsm.setDisplayName(dropConfig.getString("item.name").replace("{mob-type}", cs.getSpawnedType().name()));
item.setItemMeta(bsm); item.setItemMeta(bsm);
e.getBlock().setType(Material.AIR);
loc.getWorld().dropItem(loc, item); loc.getWorld().dropItem(loc, item);
} }

Loading…
Cancel
Save