Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henkelmax/mod-update-checker
A library for Minecraft mods, that checks for available updates.
https://github.com/henkelmax/mod-update-checker
Last synced: about 12 hours ago
JSON representation
A library for Minecraft mods, that checks for available updates.
- Host: GitHub
- URL: https://github.com/henkelmax/mod-update-checker
- Owner: henkelmax
- Created: 2023-12-04T18:01:44.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-05-30T19:44:44.000Z (5 months ago)
- Last Synced: 2024-08-01T21:50:03.161Z (3 months ago)
- Language: Java
- Homepage:
- Size: 154 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- starred - henkelmax/mod-update-checker - A library for Minecraft mods, that checks for available updates. (Java)
README
# Mod Update Checker
A library for Minecraft mods, that checks for available updates.
Also see [this](https://github.com/henkelmax/mod-update-server).## Usage
### Fabric
*build.gradle*
``` groovy
repositories {
maven { url = 'https://maven.maxhenkel.de/repository/public' }
}
dependencies {
// Use shadow or include to embed the dependency in your mod
implementation "de.maxhenkel.updatechecker:mod-update-checker:1.0.0+fabric"
}
```*fabric.mod.json*
``` json
{
...
"custom": {
"updateUrl": "https://your-update-server.com/check/fabric/yourmod"
}
}
```*Your entrypoint class*
``` java
public class YourMod implements ModInitializer {
@Override
public void onInitialize() {
// This logs if updates are available
FabricUpdateChecker.logUpdateStateAsync("your_mod_id");
// This checks for updates and gives you the result
UpdateResponse updateResponse = FabricUpdateChecker.check("your_mod_id");
//TODO Handle notifying for updates
}
}
```