from pathlib import Path


def get_setting_paths() -> list:
    """
    Returns a list of paths to the server setting and plugin settings.
    """
    settings_paths = []

    server_dir = Path(__file__).resolve().parents[1]
    for p in server_dir.iterdir():
        if p.is_file() and p.suffix != ".jar":
            settings_paths.append(p.absolute())
    
    plugin_dir = server_dir / "plugins"
    if plugin_dir.is_dir():
        for p in plugin_dir.iterdir():
            if p.is_dir and (p / "config.yml").is_file():
                settings_paths.append(p.absolute())

    return settings_paths