{"id":20949560,"url":"https://github.com/islati/minecraft-plugin-resolver","last_synced_at":"2026-05-16T18:03:54.177Z","repository":{"id":71169992,"uuid":"50450906","full_name":"Islati/minecraft-plugin-resolver","owner":"Islati","description":"🔥 Automate Spigot Plugin Download, Setup \u0026 Deploy w/ Python","archived":false,"fork":false,"pushed_at":"2023-03-20T16:57:45.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T07:42:21.449Z","etag":null,"topics":["cli","cookiecutter","cookiecutter-python","dev-tool","java","minecraft","minecraft-plugin","minecraft-plugin-resolver","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Islati.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-26T18:49:02.000Z","updated_at":"2023-03-20T17:04:32.000Z","dependencies_parsed_at":"2024-11-19T00:40:10.138Z","dependency_job_id":"d531b10c-787d-452b-a38c-51fb621635a6","html_url":"https://github.com/Islati/minecraft-plugin-resolver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Islati%2Fminecraft-plugin-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Islati%2Fminecraft-plugin-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Islati%2Fminecraft-plugin-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Islati%2Fminecraft-plugin-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Islati","download_url":"https://codeload.github.com/Islati/minecraft-plugin-resolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243345615,"owners_count":20275872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cookiecutter","cookiecutter-python","dev-tool","java","minecraft","minecraft-plugin","minecraft-plugin-resolver","python"],"created_at":"2024-11-19T00:39:54.612Z","updated_at":"2026-05-16T18:03:54.144Z","avatar_url":"https://github.com/Islati.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Plugin Resolver 🧩\n===\n\n## Using McResolver CLI _(.yml requirements file)_\n```\n$ python -m mcresolver --requirements/-r \u003cconfig-file\u003e --location/-l \u003cloc_to_store_plugins\u003e (--latest/-u)\n```\n\n## Generating configuration templates from existing config.yml\n```\n$ python -m mcresolver --generate/-g \u003cconfig-file\u003e --plugin \u003cname\u003e\n```\n\n[(Example) Commons Configuration](https://github.com/Islati/minecraft-plugin-config-templates/tree/master/Commons/1.8.8-3)\n\n*Download \u0026 Configure plugins automatically 🔧*\nAn example of this is presented below, for the Bukkit plugin 'Vault', the economy API.\n\n### Configuration example\n```yaml\n\n    Bukkit:\n      Vault:\n        version: 1.5.6\n        configure:\n          enabled: true\n          folder: Vault\n          file: config.yml\n          #Name of the plugin data folder\n          plugin-data-folder: Vault\n          # Template link for the processor\n          template: https://raw.githubusercontent.com/Islati/minecraft-plugin-config-templates/master/Vault/config.yml\n          # Script to create the configuration.\n          script: https://github.com/Islati/minecraft-plugin-config-templates/blob/master/Vault/vault_all.py\n          # Defaults file gives us values to assign to variables\n          defaults: https://github.com/Islati/minecraft-plugin-config-templates/blob/master/Vault/defaults.yml\n          # This is vaults config.yml file here, the options are for the config file.\n          options:\n            update_check: true\n```\n\n👉 When we run this:\n* ✅ We generate the config folder for vault inside the plugins folder (_'plugins/Vault/'_)\n* ✅ Inside the created folder, we generate the _'config.yml'_ file using a mix of `defaults.yml` and the `config.yml` _template_.\n\nThe template option is used to render the configuration, where each of the keys and values inside\nof the options node is passed to the template to fill it and generate a full config for the plugin.\nThe templating engine for this is Jinja2, which takes the key (variable name inside the template) and fills it\nwith the value (example: update_check inside the template, to fill 'update-check: {{update_check}}' will be\nrendered to 'update-check: true' in this case, as the value under options is set to true.\n\n_It's really quite simple._\n\n## Example Python script to generate `config.yml` for [Commons](https://github.com/Islati/Commons) 🥽\n```python\n    from minecraftpluginresolver.scripts import *\n\n    _plugin_versions_ = ['1.8.8-3']\n    _plugin_id_ = \"15290\"  # Spigot resource ID\n\n    __config_template__ = \"https://raw.githubusercontent.com/TechnicalBro/minecraft-plugin-config-templates/master/Commons/1.8.8-3/config.%s\"\n    __config_defaults__ = \"https://raw.githubusercontent.com/TechnicalBro/minecraft-plugin-config-templates/feature-1-yaml-scripting-python-hooks/Commons/1.8.8-3/defaults.yml\"\n\n    def configure(parent_folder, config_options={}, **kwargs):\n        commons_folder = os.path.join(parent_folder, 'Commons')\n\n        if not os.path.exists(commons_folder):\n            os.makedirs(commons_folder)\n\n        # Get the default configuration values for Commons, incase some aren't present in the options.\n        defaults = get_configuration_defaults(url=__config_defaults__)\n\n        # Create a full dictionary of all the options required to render the template, merging\n        # in the missing values from the default config.\n        options = merge_configuration_options(config_options, defaults)\n\n        # Commons supports multiple configuration options, yml and xml (likely more in the future)\n        # So a kwarg is optionally passed to specify the type of configuration to render.\n        config_type = kwargs.get('config_type', 'yml')\n\n        config_file = os.path.join(commons_folder, 'config.%s' % config_type)\n\n        # Render the configuration of Commons from the url, with the options (and defaults included)\n        commons_config = render_config_from_url(__config_template__ % config_type, options)\n        # Lastly write the configuration to the file specified!\n        write_config_to_file(config_file, commons_config)\n        print(\"Configuration for Commons 1.8.8-3 has been rendered!\")\n```\n\nThere are 3 required components for a configuration script. If you notice in the above example there's the following.\n\n```python\n\n    # Which versions of the plugin this script can configure.\n    _plugin_versions_ = ['1.8.8-3']\n    # Identifier of the plugin. whether it's the name (bukkit) or id (spigot)\n    _plugin_id_ = \"15290\"  # Spigot resource ID\n\n    \n    def configure(parent_folder, config_options={}, **kwargs):\n        #TODO: Write your code to configure plugins here.\n        pass\n ```\n\nThe plugin_versions is a list of all the versions (of the plugin) that this script can configure for.\nRequired, as most plugins have their configuration change throughout time.\n\nThe plugin_id is the identifier of the plugin, whether it's the name (Bukkit) or id (Spigot). This is required\nto verify that the plugin we're configuring for is handled by a specific script.\n\nYay metavars!!! 🧪\n\nLastly, we've got the configure method, which takes a parent_folder parameter, config_options dictionary, and then\na variable amount of keyword arguments.\n\nIn the above example Commons depends on the config_type kwarg, to determine what kind of configuration to use:\nXml or Yml, as it support both.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislati%2Fminecraft-plugin-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fislati%2Fminecraft-plugin-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislati%2Fminecraft-plugin-resolver/lists"}