package net.glowstone.block.itemtype;

import net.glowstone.EventFactory;
import net.glowstone.block.GlowBlock;
import net.glowstone.block.ItemTable;
import net.glowstone.block.blocktype.BlockTNT;
import net.glowstone.entity.GlowPlayer;
import org.bukkit.Material;
import org.bukkit.block.BlockFace;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;

public class ItemFlintAndSteel extends ItemTool {

    public ItemFlintAndSteel() {
        super(Material.FLINT_AND_STEEL.getMaxDurability());
    }

    @Override
    public boolean onToolRightClick(GlowPlayer player, ItemStack holding, GlowBlock target, BlockFace face, Vector clickedLoc) {
        if (target.getType() == Material.OBSIDIAN) {
            fireNetherPortal();
        } 
        if (target.getType() == Material.TNT) {
            fireTnt(target);
        } 
        if (target.getType() == Material.STONE) {
            setBlockOnFire(player, target, face, holding, clickedLoc);
        } 
        if (target.isFlammable()) {
            setBlockOnFire(player, target, face, holding, clickedLoc);
        } 
        return true;
    }

    private void fireNetherPortal() {
        // TODO: check for nether portal and activate it
    }

    private void fireTnt(GlowBlock tnt) {
        BlockTNT.igniteBlock(tnt, false);
    }

    private boolean setBlockOnFire(GlowPlayer player, GlowBlock clicked, BlockFace face, ItemStack holding, Vector clickedLoc) {
        GlowBlock fireBlock = clicked.getRelative(face);
        if (fireBlock.getType() != Material.AIR) {
            return true;
        }

        BlockIgniteEvent event = EventFactory.callEvent(new BlockIgniteEvent(fireBlock, BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL, player, null));
        if (event.isCancelled()) {
            player.setItemInHand(holding);
            return false;
        }

        // clone holding to avoid decreasing of the item's amount
        ItemTable.instance().getBlock(Material.FIRE).rightClickBlock(player, clicked, face, holding.clone(), clickedLoc);

        return true;
    }
}

package net.glowstone.block.itemtype;

import net.glowstone.EventFactory;
import net.glowstone.block.GlowBlock;
import net.glowstone.block.ItemTable;
import net.glowstone.block.blocktype.BlockTNT;
import net.glowstone.entity.GlowPlayer;
import org.bukkit.Material;
import org.bukkit.block.BlockFace;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;

public class ItemFlintAndSteel extends ItemTool {

    public ItemFlintAndSteel() {
        super(Material.FLINT_AND_STEEL.getMaxDurability());
    }

    @Override
    public boolean onToolRightClick(GlowPlayer player, ItemStack holding, GlowBlock target, BlockFace face, Vector clickedLoc) {
        if (target.getType() == Material.OBSIDIAN) {
            fireNetherPortal();
        } 
        if (target.getType() == Material.TNT) {
            fireTnt(target);
        } 
        if (target.isFlammable() || target.getType().isOccluding() || target.getType() == Material.STONE) {
            setBlockOnFire(player, target, face, holding, clickedLoc);
        } 
        return true;
    }

    private void fireNetherPortal() {
        // TODO: check for nether portal and activate it
    }

    private void fireTnt(GlowBlock tnt) {
        BlockTNT.igniteBlock(tnt, false);
    }

    private boolean setBlockOnFire(GlowPlayer player, GlowBlock clicked, BlockFace face, ItemStack holding, Vector clickedLoc) {
        GlowBlock fireBlock = clicked.getRelative(face);
        if (fireBlock.getType() != Material.AIR) {
            return true;
        }

        BlockIgniteEvent event = EventFactory.callEvent(new BlockIgniteEvent(fireBlock, BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL, player, null));
        if (event.isCancelled()) {
            player.setItemInHand(holding);
            return false;
        }

        // clone holding to avoid decreasing of the item's amount
        ItemTable.instance().getBlock(Material.FIRE).rightClickBlock(player, clicked, face, holding.clone(), clickedLoc);

        return true;
    }
}

Correct which blocks should be lit by Flint and Steel