def find_item_class(player, classobj, locations=None, ignore_dark=False):
    """
    Find the first item that is an instance of a specific class in the provided
    locations

    :param text_game_maker.player.player.Player player: player object
    :param str name: name of item to find
    :param [[text_game_maker.game_objects.items.Item]] locations: location        lists to search
    :return: found item (None if no matching item is found)
    :rtype: text_game_maker.items.Item
    """
    if not ignore_dark and not player.can_see():
        return None
    if locations is None:
        locations = player.current.items.values()
    for itemlist in locations:
        for item in itemlist:
            if isinstance(item, classobj):
                return item
    return None
