continue;
}
if (BlockType.shouldPlaceLast(world.getBlockTypeIdAt(BukkitUtil.toLocation(world, pt)))) {
Block block = world.getBlockAt(BukkitUtil.toLocation(world, pt));
if (block instanceof InventoryHolder) {
InventoryHolder holder = (InventoryHolder) block;
holder.getInventory().clear();
}
block.setType(Material.AIR);
} else {
// Can't destroy these blocks yet
queued.add(pt);
}
}
}
}
for (Vector pt : queued) {
Block block = world.getBlockAt(BukkitUtil.toLocation(world, pt));
if (block instanceof InventoryHolder) {
InventoryHolder holder = (InventoryHolder) block;
holder.getInventory().clear();
}
block.setType(Material.AIR);
}
}