@Override
    public void onBlockPlace(BlockPlaceEvent event) {
	final Block block = event.getBlock();
	final Player player = event.getPlayer();
	final PlanArea area = BuildingPlanner.plugin.areaManager.getAffectedArea(block);
	if (area == null) {
	    return;
	}

	if (!area.checkPermission(event.getPlayer(), OpType.MODIFY)) {
	    event.setCancelled(true);
	    return;
	}

	if (area.isLocked()) {
	    event.getPlayer().sendMessage("Area is locked: "+area.getLockReason());
	    event.setCancelled(true);
	    return;
	}

	if (!validBlock(event.getBlockPlaced())) {
	    event.getPlayer().sendMessage("This block is not allowed to be placed in planning area");
	    event.setCancelled(true);
	    return;
	}
	
	final ItemStack itemInHand = player.getItemInHand();
	final Material type = itemInHand.getType();
	
	final short durability = itemInHand.getDurability();
	int task = BuildingPlanner.plugin.getServer().getScheduler()
		.scheduleSyncDelayedTask(BuildingPlanner.plugin, new Runnable() {
		    public void run() {
			addBlockToArea(block, player, area, type, durability);

			// Special extendable blocks.
			if (block.getState().getData() instanceof Door) {
			    addBlockToArea(block.getRelative(BlockFace.UP), player, area, null, (short) 0);
			} else if (block.getState().getData() instanceof Bed) {
			    Bed bed = (Bed) block.getState().getData();
			    addBlockToArea(block.getRelative(bed.getFacing()), player, area, null, (short) 0);
			}
		    }

		});

	super.onBlockPlace(event);
    }