-
Notifications
You must be signed in to change notification settings - Fork 1
Utils Updater
SimplixCore offers a way for automatic update checks and automatic update installation. This works for every SimplixAppliaction so like SimplixLibraries and Plugins. This will not work for standalone applications.
If you want to benefit from SimplixCore's version checking, you need to place a updatepolicy.json
file into your resources folder. The file looks like that:
{
"versionPattern": "regex-here",
"versionFetcherClass": "dev.simplix.core.common.updater.SpigotMcResourceVersionFetcher",
"versionFetcher": {
"resourceId": "63778"
},
"updateDownloaderClass": "dev.simplix.core.common.updater.UrlUpdateDownloader",
"updateDownloader": {
"url": "https://my-file-host.com/myplugin/latest.jar"
}
}
versionPattern
: Optional, only needed when using a non standard versioning scheme.
versionFetcherClass
: Required, the class that will be used for querying the latest version number.
versionFetcher
: Required, a serialized instance of the VersionFetcher class.
updateDownloaderClass
: Optional, only needed if you want to automatically download the update file. The class that is beeing used for downloading the update.
updateDownloader
: Optional, only needed if you want to automatically download the update file. A serialized instance of the UpdateDownloader class.
Class | Purpose |
---|---|
dev.simplix.core.common.updater.SpigotMcResourceVersionFetcher | This will fetch the latest version number from a provided SpigotMC.org resource identified with its resourceId |
dev.simplix.core.common.updater.UrlVersionFetcher | This will fetch the latest version number from a provided url. The response has to be plain text. |
Class | Purpose |
---|---|
dev.simplix.core.common.updater.UrlUpdateDownloader | This downloads a binary file from a provided url |
2020 - SimplixSoftworks
- Introduction
- Getting started
- Maven Dependencies
- How to use the Dependency-Injection
- Localization
- Listener API
- SQL
- Libraries
- Utilities
- Contribute