1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Tweaked Auto-Updater

This commit is contained in:
TheBusyBiscuit 2019-09-26 08:21:49 +02:00
parent dcee66839f
commit 5a591e4f7e

View File

@ -166,14 +166,18 @@ public final class SlimefunPlugin extends JavaPlugin {
// Setting up the Auto-Updater // Setting up the Auto-Updater
Updater updater; Updater updater;
if (!getDescription().getVersion().startsWith("DEV - ")) { if (getDescription().getVersion().startsWith("DEV - ")) {
// We are using an official build, use the BukkitDev Updater
updater = new BukkitUpdater(this, getFile(), 53485);
}
else {
// If we are using a development build, we want to switch to our custom // If we are using a development build, we want to switch to our custom
updater = new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/Slimefun4/master"); updater = new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/Slimefun4/master");
} }
else if (getDescription().getVersion().startsWith("RC - ")) {
// If we are using a development build, we want to switch to our custom
updater = new GitHubBuildsUpdater(this, getFile(), "TheBusyBiscuit/Slimefun4/stable");
}
else {
// We are using an official build, use the BukkitDev Updater
updater = new BukkitUpdater(this, getFile(), 53485);
}
if (config.getBoolean("options.auto-update")) updater.start(); if (config.getBoolean("options.auto-update")) updater.start();