Skip to content

Commit

Permalink
8.2.0
Browse files Browse the repository at this point in the history
- Added internal SSH server
- check server-updater.version too for plugins/mods updater before checking other places
  • Loading branch information
Osiris-Team committed Jul 2, 2024
1 parent b173765 commit 5a3d927
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
build:

runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
// Important for AutoPlugs Self-Updater!
// Also take a look at the generateAutoplugProperties task where these properties get turned into the actual autoplug.properties file.
group = 'com.osiris.autoplug.client'
version = '8.1.6'
version = '8.2.0'
description = 'Responsible for all the main actions.'

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class UpdaterConfig extends MyYaml {
public YamlSection server_updater_profile;
public YamlSection server_software;
public YamlSection server_steamcmd_login;
public YamlSection server_version;
public YamlSection server_updater_version;
public YamlSection server_build_id;
public YamlSection server_skip_hash_check;
public YamlSection server_github_repo_name;
Expand Down Expand Up @@ -154,7 +154,7 @@ public UpdaterConfig() throws IOException, DuplicateKeyException, YamlReaderExce
server_steamcmd_login = put(name, "server-updater", "steam-cmd-login")
.setComments("Some games require you to be logged in. Add your username and password, separated by a space below (<username> <password>).",
"Note that SteamGuard must be disabled.");
server_version = put(name, "server-updater", "version").setComments(
server_updater_version = put(name, "server-updater", "version").setComments(
"If left empty, taken from general.yml, if also empty, taken from server jar.\n" +
"A list of supported versions can be found in the links below:\n" +
"- Minecraft versions: https://papermc.io/api/v2/projects/paper | https://papermc.io/api/v2/projects/waterfall | https://papermc.io/api/v2/projects/travertine | https://papermc.io/api/v2/projects/velocity | https://purpur.pl3x.net/downloads | https://fabricmc.net/use/installer\n" +
Expand Down Expand Up @@ -196,7 +196,7 @@ public UpdaterConfig() throws IOException, DuplicateKeyException, YamlReaderExce
plugins_updater_profile = put(name, "plugins-updater", "profile").setDefValues("AUTOMATIC");
plugins_updater_path = put(name, "plugins-updater", "path").setDefValues("./plugins");
plugins_updater_version = put(name, "plugins-updater", "version").setComments("The Minecraft version to check and download plugins for.",
"If left empty, taken from general.yml, if also empty, taken from server jar.",
"If left empty, taken from server-updater.version above, if also empty, taken from general.yml, if also empty, taken from server jar.",
"Currently only relevant for Modrinth plugins.");
plugins_updater_async = put(name, "plugins-updater", "async").setDefValues("true").setComments(
"Asynchronously checks for updates.",
Expand All @@ -216,7 +216,7 @@ public UpdaterConfig() throws IOException, DuplicateKeyException, YamlReaderExce
mods_updater_profile = put(name, "mods-updater", "profile").setDefValues("AUTOMATIC");
mods_updater_path = put(name, "mods-updater", "path").setDefValues("./mods");
mods_updater_version = put(name, "mods-updater", "version").setComments("The Minecraft version to check and download mods for.",
"If left empty, taken from general.yml, if also empty, taken from server jar.");
"If left empty, taken from server-updater.version above, if also empty, taken from general.yml, if also empty, taken from server jar.");
mods_updater_async = put(name, "mods-updater", "async").setDefValues("true").setComments(
"Asynchronously checks for updates.",
"Normally this should be faster than checking for updates synchronously, thus it should be enabled.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public void runAtStart() throws Exception {


String mcVersion = updaterConfig.mods_updater_version.asString();
if (mcVersion == null) updaterConfig.server_updater_version.asString();
if (mcVersion == null) mcVersion = Server.getMCVersion();

ExecutorService executorService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ else if (installedPlugin.getVersion() == null || installedPlugin.getVersion().tr
UpdaterConfig updaterConfig = new UpdaterConfig();

String mcVersion = updaterConfig.plugins_updater_version.asString();
if (mcVersion == null) updaterConfig.server_updater_version.asString();
if (mcVersion == null) mcVersion = Server.getMCVersion();

for (MinecraftPlugin pl :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void runAtStart() throws Exception {
profile = updaterConfig.server_updater_profile.asString();
serverSoftware = updaterConfig.server_software.asString();

serverVersion = updaterConfig.server_version.asString();
serverVersion = updaterConfig.server_updater_version.asString();
if (serverVersion == null) serverVersion = new GeneralConfig().server_version.asString();
if (serverVersion == null) serverVersion = new UtilsMinecraft().getInstalledVersion();
if (serverVersion == null) throw new NullPointerException(GD.errorMsgFailedToGetMCVersion());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Osiris-Team.
* Copyright (c) 2022-2024 Osiris-Team.
* All rights reserved.
*
* This software is copyrighted work, licensed under the terms
Expand Down Expand Up @@ -35,7 +35,7 @@ private void defaultTest(String serverSoftware, String version) throws Exception
updaterConfig.server_updater.setValues("true");
updaterConfig.server_updater_profile.setValues("AUTOMATIC");
updaterConfig.server_software.setValues(serverSoftware);
updaterConfig.server_version.setValues(version);
updaterConfig.server_updater_version.setValues(version);
updaterConfig.server_build_id.setValues("");
updaterConfig.save();
new TaskServerUpdater("ServerUpdater", maMan.manager)
Expand Down

0 comments on commit 5a3d927

Please sign in to comment.