What is it?
UpdateAPI is a simple library that you can use to automatically update your plugins.
How does it work?
Using spiget.org
Does it ACTUALLY download the new update and install it?
Yes, however, a restart / reload is needed.
How to use
It's as simple as adding this line to your onEnable:
However, you can go more advanced and do something like this in your onEnable:
Respectable use policy
PLEASE allow the users to disable auto updates in the configuration! Some people don't want to automatically update, although this librrary does make it very easy!
Source
https://github.com/snekman11/UpdateAPI
Javadocs
https://snekman11.github.io/UpdateAPI-JDocs/
Why is this so big?
Because I use the Apache Commons-io library. I will remove it in a future update.
What is this licensed under?
MIT
UpdateAPI is a simple library that you can use to automatically update your plugins.
How does it work?
Using spiget.org
Does it ACTUALLY download the new update and install it?
Yes, however, a restart / reload is needed.
How to use
It's as simple as adding this line to your onEnable:
Code (Text):
UpdateAPI.checkForUpdate(this, 4468, true);
Code (Text):
boolean isUpdate = UpdateAPI.checkForUpdate(this, 4468, false);
if(!isUpdate) {
System.out.println("No updates available");
}
else {
System.out.println("There is an update available, it will now be downloaded");
boolean success = UpdateAPI.download(4468);
if(success) {
System.out.println("Downloaded update successfully! Please restart your server");
}
else {
System.out.println("Failed to download the update! Check your connection.");
}
}
if(!isUpdate) {
System.out.println("No updates available");
}
else {
System.out.println("There is an update available, it will now be downloaded");
boolean success = UpdateAPI.download(4468);
if(success) {
System.out.println("Downloaded update successfully! Please restart your server");
}
else {
System.out.println("Failed to download the update! Check your connection.");
}
}
PLEASE allow the users to disable auto updates in the configuration! Some people don't want to automatically update, although this librrary does make it very easy!
Source
https://github.com/snekman11/UpdateAPI
Javadocs
https://snekman11.github.io/UpdateAPI-JDocs/
Why is this so big?
Because I use the Apache Commons-io library. I will remove it in a future update.
What is this licensed under?
MIT
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
UpdateAPI is a free Minecraft Java mod. Downloaded 320 times (via Spigot). Download it and open it directly in the game.