try
range = if our WEAPON slot name.contains("crossbow", "bow", ....)
melee = if all other options fail or check weapon type with names
magic = autocasting or has special staff with attackable option (trident, ...)
public boolean isAutocasting(AutocastSpell auto) {
return ctx.getConfigs().get(AUTOCAST_SPELL_CONFIG) == auto.getConfigValue();
}