This API allows you to use Spiget easily with just one method, it checks if the plugins needs a new update just by entering the current version and the resource id/name.
How to use the API
You can use the API with just this simple method:
UpdateChecker.checkUpdate(resourceID, currentVersion);
Example:
import org.bukkit.Bukkit ;
import org.bukkit.ChatColor ;
import org.bukkit.plugin.java.JavaPlugin ;
public class MainTest extends JavaPlugin {
@Override
public void onEnable ( ) {
update ( ) ;
}
public void update ( ) {
if ( UpdateChecker. checkUpdate ( 1155 , 1.2 ) ) {
//There's a new update avaliable
}
}
}
ID is marked with blue
Name is marked with green
https://www.spigotmc.org/resources/ update-checker-needs-update . 17608 /
It's recommend to use the resource ID instead of the resource name.
Attention
By the li
mitatio ns of Spiget it will take up to 3 hours depending on when you post the new update.
How to use the API
Code (Text):
UpdateChecker.checkUpdate(resourceID, currentVersion);
Code (Java):
import org.bukkit.Bukkit ;
import org.bukkit.ChatColor ;
import org.bukkit.plugin.java.JavaPlugin ;
public class MainTest extends JavaPlugin {
@Override
public void onEnable ( ) {
update ( ) ;
}
public void update ( ) {
if ( UpdateChecker. checkUpdate ( 1155 , 1.2 ) ) {
//There's a new update avaliable
}
}
}
How the get the resource ID/Name
Go to your resource page and you can view it in the URL
ID is marked with blue
Name is marked with green
https://www.spigotmc.org/resources/ update-checker-needs-update . 17608 /
It's recommend to use the resource ID instead of the resource name.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.7, 1.8, 1.9
- 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.
Update checker - "Needs Update?" is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 689 times (via Spigot). Download it and open it directly in the game.