function init(hero) {
    hero.setName("Nightcrawler");
    hero.setTier(6);
    hero.setVersion("\u00A7c\u00A7lX\u00A76\u00A7l-\u00A7e\u00A7lMEN\u00A7f")

    hero.setHelmet("Head");
    hero.setChestplate("Chestplate");
    hero.setLeggings("Leggings");
    hero.setBoots("Boots");

    hero.addPowers("mvh:xm_nightcrawler")
    hero.addAttribute("FALL_RESISTANCE", 1, 1);
    hero.addAttribute("JUMP_HEIGHT", 1, 0);
    hero.addAttribute("BASE_SPEED", 0.35, 1);
    hero.addAttribute("SPRINT_SPEED", 0.2, 1);
    
    hero.addKeyBind("SHADOWFORM", "key.shadowForm", 1);
    hero.addKeyBind("TELEPORT", "key.teleport", 2);

    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:flight":
        return entity.getData("fiskheroes:shadowform");
    default:
        return true;
    }
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
    case "SHADOWFORM":
        return entity.isOnGround();
    default:
        return true;
    }
}