    public void onBlockIgnite(BlockIgniteEvent event) {
        IgniteCause cause = event.getCause();
        Block block = event.getBlock();
        Player player = event.getPlayer();
        World world = block.getWorld();
        boolean isFireSpread = cause == IgniteCause.SLOW_SPREAD
                || cause == IgniteCause.SPREAD;
        if (plugin.preventLavaFire && cause == IgniteCause.LAVA) {
            event.setCancelled(true);
            return;
        }
        if (plugin.disableFireSpread) {
            event.setCancelled(true);
            return;
        }
        if (plugin.blockLighter && cause == IgniteCause.FLINT_AND_STEEL) {
            event.setCancelled(true);
            return;
        }
        if (plugin.fireSpreadDisableToggle && isFireSpread) {
            event.setCancelled(true);
            return;
        }
        if (plugin.disableFireSpreadBlocks.size() > 0 && isFireSpread) {
            int x = block.getX();
            int y = block.getY();
            int z = block.getZ();
            if (plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x, y - 1, z))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x + 1, y, z))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x - 1, y, z))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x, y, z - 1))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x, y, z + 1))) {
                event.setCancelled(true);
                return;
            }
        }
        if (plugin.useRegions && player != null && !plugin.hasPermission(player, "/regionbypass")) {
            Vector pt = toVector(block);
            LocalPlayer localPlayer = plugin.wrapPlayer(player);
            if (cause == IgniteCause.FLINT_AND_STEEL
                    && !plugin.regionManager.getApplicableRegions(pt).canBuild(localPlayer)) {
                event.setCancelled(true);
                return;
            }
            if (cause == IgniteCause.FLINT_AND_STEEL
                    && !plugin.regionManager.getApplicableRegions(pt).allowsLighter()) {
                event.setCancelled(true);
                return;
            }
        }
    }

    public void onBlockIgnite(BlockIgniteEvent event) {
        IgniteCause cause = event.getCause();
        Block block = event.getBlock();
        Player player = event.getPlayer();
        World world = block.getWorld();
        boolean isFireSpread = cause == IgniteCause.SLOW_SPREAD
                || cause == IgniteCause.SPREAD;
        if (plugin.preventLavaFire && cause == IgniteCause.LAVA) {
            event.setCancelled(true);
            return;
        }
        if (plugin.disableFireSpread && isFireSpread) {
            event.setCancelled(true);
            return;
        }
        if (plugin.blockLighter && cause == IgniteCause.FLINT_AND_STEEL) {
            event.setCancelled(true);
            return;
        }
        if (plugin.fireSpreadDisableToggle && isFireSpread) {
            event.setCancelled(true);
            return;
        }
        if (plugin.disableFireSpreadBlocks.size() > 0 && isFireSpread) {
            int x = block.getX();
            int y = block.getY();
            int z = block.getZ();
            if (plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x, y - 1, z))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x + 1, y, z))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x - 1, y, z))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x, y, z - 1))
                    || plugin.disableFireSpreadBlocks.contains(world.getBlockTypeIdAt(x, y, z + 1))) {
                event.setCancelled(true);
                return;
            }
        }
        if (plugin.useRegions && player != null && !plugin.hasPermission(player, "/regionbypass")) {
            Vector pt = toVector(block);
            LocalPlayer localPlayer = plugin.wrapPlayer(player);
            if (cause == IgniteCause.FLINT_AND_STEEL
                    && !plugin.regionManager.getApplicableRegions(pt).canBuild(localPlayer)) {
                event.setCancelled(true);
                return;
            }
            if (cause == IgniteCause.FLINT_AND_STEEL
                    && !plugin.regionManager.getApplicableRegions(pt).allowsLighter()) {
                event.setCancelled(true);
                return;
            }
        }
    }
