def is_valid_minecraft_username(username):
    """https://help.mojang.com/customer/portal/articles/928638-minecraft-usernames"""
    allowed_chars = 'abcdefghijklmnopqrstuvwxyz1234567890_'
    allowed_len = [3, 16]
    username = username.lower()
    if len(username) < allowed_len[0] or len(username) > allowed_len[1]:
        return False
    for char in username:
        if char not in allowed_chars:
            return False
    return True
