diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/UpdaterService.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/UpdaterService.java index bea541fc28..b556789a91 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/UpdaterService.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/UpdaterService.java @@ -5,10 +5,10 @@ import javax.annotation.Nonnull; +import io.github.bakedlibs.dough.updater.BlobBuildUpdater; import org.bukkit.plugin.Plugin; import io.github.bakedlibs.dough.config.Config; -import io.github.bakedlibs.dough.updater.GitHubBuildsUpdater; import io.github.bakedlibs.dough.updater.PluginUpdater; import io.github.bakedlibs.dough.versions.PrefixedVersion; import io.github.thebusybiscuit.slimefun4.api.SlimefunBranch; @@ -16,7 +16,7 @@ /** * This Class represents our {@link PluginUpdater} Service. - * If enabled, it will automatically connect to https://thebusybiscuit.github.io/builds/ + * If enabled, it will automatically connect to https://blob.build/ * to check for updates and to download them automatically. * * @author TheBusyBiscuit @@ -53,15 +53,15 @@ public class UpdaterService { */ public UpdaterService(@Nonnull Slimefun plugin, @Nonnull String version, @Nonnull File file) { this.plugin = plugin; - GitHubBuildsUpdater autoUpdater = null; + BlobBuildUpdater autoUpdater = null; if (version.contains("UNOFFICIAL")) { // This Server is using a modified build that is not a public release. branch = SlimefunBranch.UNOFFICIAL; - } else if (version.startsWith("DEV - ")) { + } else if (version.startsWith("Dev - ")) { // If we are using a development build, we want to switch to our custom try { - autoUpdater = new GitHubBuildsUpdater(plugin, file, "TheBusyBiscuit/Slimefun4/master"); + autoUpdater = new BlobBuildUpdater(plugin, file, "Slimefun4", "Dev"); } catch (Exception x) { plugin.getLogger().log(Level.SEVERE, "Failed to create AutoUpdater", x); } @@ -70,7 +70,7 @@ public UpdaterService(@Nonnull Slimefun plugin, @Nonnull String version, @Nonnul } else if (version.startsWith("RC - ")) { // If we are using a "stable" build, we want to switch to our custom try { - autoUpdater = new GitHubBuildsUpdater(plugin, file, "TheBusyBiscuit/Slimefun4/stable", "RC - "); + autoUpdater = new BlobBuildUpdater(plugin, file, "Slimefun4", "RC"); } catch (Exception x) { plugin.getLogger().log(Level.SEVERE, "Failed to create AutoUpdater", x); } diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/core/services/TestUpdaterService.java b/src/test/java/io/github/thebusybiscuit/slimefun4/core/services/TestUpdaterService.java index 9f76c65d42..4de8e01e62 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/core/services/TestUpdaterService.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/core/services/TestUpdaterService.java @@ -33,7 +33,7 @@ public static void unload() { @Test @DisplayName("Test if the development branch is recognized correctly") void testDevelopmentBuilds() { - UpdaterService service = new UpdaterService(plugin, "DEV - 131 (git 123456)", file); + UpdaterService service = new UpdaterService(plugin, "Dev - 131 (git 123456)", file); Assertions.assertEquals(SlimefunBranch.DEVELOPMENT, service.getBranch()); Assertions.assertTrue(service.getBranch().isOfficial()); // Cannot currently be tested... yay