Tool for updating Minecraft plugins from multiple different sources.
Requires Java 17.
The following sources can be used for updating:
- DevBukkit
- GitHub releases
- GitLab releases (including from self-hosted instances)
- Hangar (PaperMC plugins)
- Modrinth
- TeamCity CI builds (e.g. for WorldGuard/WorldEdit)
- Own hosted Jenkins (via direct download source or if locally hosted file source)
- SpigotMC using Spiget (Downloads might fail depending on whether Spiget has the files cached or not as SpigotMC.org uses DDOS protection in front of downloads. The source tries to scan resource pages for GitHub releases too though)
- Options handling
- Download and linking logic
- Version caching and checking
- Show changes between versions
- Specify semantic version update level
- Configurator utility
- More sources (e.g. CIs like GitHub actions, Travis or Circle. PRs welcome!)
- Plugin implementation
- Plugin-provided updater configs
- Provide a hosted repository for update configs of popular plugins
Run it with java -jar PhoenixUpdater.jar <options>
If the plugin option is not specified then it will scan all jar files in the target folder path too for possible new plugin sources.
-t <path>
,--target-folder <path>
Target folder where updates get downloaded to (Required)-p <name>
,--plugin <name>
Only check/update one plugin (Optional)-c
,--check-only
Only check for new versions, don't download updates (Optional)-d
,--dont-link
Only download new versions, don't link them (Optional)-l <level>
,--log-level <level>
Only print messages of the specified level or higher (Optional, default:INFO
)dont-search-existing-jars
Don't search for existing jars in the target folder to find new plugins (Optional)
The program uses multiple configuration files for specifying where the updates for different plugins should come from. These are the plugins.hocon
and sources.hocon
files. They configure individual plugins and custom sources respectively.
bukkit
Downloads from dev.bukkit.org.
Required plugin placeholders:pluginid
(can be obtained from here)github
Downloads GitHub releases.
Required plugin placeholders:user
Optional:repository
(Defaults to plugin name),file-pattern
(to match a specific file of a release),token
orusername
andpassword
gitlab
Downloads GitLab releases.
Required plugin placeholders:user
Optional:repository
(Defaults to plugin name),token
,apiurl
(Defaults tohttps://gitlab.com/api/v4/
)hangar
Downloads Hangar.papermc.io releases. Required plugin placeholders:user
Optional:project
(Defaults to plugin name),channel
,platform
,platform-version
modrinth
Downloads Modrinth releases. Required plugin placeholders:user
Optional:project
(Defaults to plugin name),featured
(Defaults to true),platform
,platform-version
spigot
Tries to download from SpigotMC.org and falls back to GitHub if found.
Required plugin placeholders:resourceid
teamcity
Downloads from a self-hosted teamcity instance.
Required plugin placeholders:project
,buildtype
direct
Queries the version and downloads the jar directly from an URL. E.g. like Jenkins allows it.
Required placeholders are defined in thesources.hocon
entryfile
Queries the version and copies the jar directly from a file location. E.g. like you can do it with Jenkins if it runs on the same server.
Required placeholders are defined in thesources.hocon
entry
Direct source version checks which return more than just the version can have an additional config option version-regex-pattern
or version-json-path
to specify a JSON path to the version string in the response json of the query. (See this online tool if you need help with JSON paths)
Direct source versions which do not use a static nor versioned url for downloads can use the download-regex-pattern
or download-json-path
config options similarly to the versions one to query the actual update url from the response of querying the download
url.
Downloads that return a zip file can use the zip-entry-pattern
placeholder to define the regex pattern of the file to look for inside the zip file.
Downloads are currently available on the Minebench.de CI server: https://ci.minebench.de/job/PhoenixUpdater/
This program is licensed under the terms of the AGPLv3.
Copyright (C) 2020 Max Lee aka Phoenix616 ([email protected])
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.