diff --git a/LaunchServer/source/command/handler/CommandHandler.java b/LaunchServer/source/command/handler/CommandHandler.java index d031c53..af85358 100644 --- a/LaunchServer/source/command/handler/CommandHandler.java +++ b/LaunchServer/source/command/handler/CommandHandler.java @@ -30,13 +30,7 @@ import launchserver.command.basic.RebindCommand; import launchserver.command.basic.StopCommand; import launchserver.command.basic.VersionCommand; -import launchserver.command.hash.DownloadAssetCommand; -import launchserver.command.hash.DownloadClientCommand; -import launchserver.command.hash.IndexAssetCommand; -import launchserver.command.hash.SyncBinariesCommand; -import launchserver.command.hash.SyncProfilesCommand; -import launchserver.command.hash.SyncUpdatesCommand; -import launchserver.command.hash.UnindexAssetCommand; +import launchserver.command.hash.*; import launchserver.command.legacy.DumpBinaryAuthHandler; public abstract class CommandHandler implements Runnable { @@ -63,6 +57,8 @@ registerCommand("syncBinaries", new SyncBinariesCommand(server)); registerCommand("syncUpdates", new SyncUpdatesCommand(server)); registerCommand("syncProfiles", new SyncProfilesCommand(server)); + // Custom + registerCommand("syncAll", new SyncAllCommand(server)); // Register auth commands registerCommand("auth", new AuthCommand(server)); diff --git a/LaunchServer/source/command/hash/SyncAllCommand.java b/LaunchServer/source/command/hash/SyncAllCommand.java new file mode 100644 index 0000000..984fbde --- /dev/null +++ b/LaunchServer/source/command/hash/SyncAllCommand.java @@ -0,0 +1,34 @@ +package launchserver.command.hash; + +import launcher.helper.LogHelper; +import launchserver.LaunchServer; +import launchserver.command.Command; + +import java.io.IOException; + +// Source: https://github.com/GravitLauncher/Launcher/commit/3e6384cad9c4bdc2fdc1a614bdcafe9cbc1df4bb +// By Will0376 +public class SyncAllCommand extends Command { + public SyncAllCommand(LaunchServer server) { + super(server); + } + + @Override + public String getArgsDescription() { + return null; + } + + @Override + public String getUsageDescription() { + return "Resync profiles & updates dirs"; + } + + @Override + public void invoke(String... args) throws IOException { + server.syncProfilesDir(); + LogHelper.subInfo("Profiles successfully resynced"); + + server.syncUpdatesDir(null); + LogHelper.subInfo("Updates dir successfully resynced"); + } +} \ No newline at end of file diff --git a/Launcher/source/client/ClientProfile.java b/Launcher/source/client/ClientProfile.java index 87b4d11..2b18803 100644 --- a/Launcher/source/client/ClientProfile.java +++ b/Launcher/source/client/ClientProfile.java @@ -210,7 +210,7 @@ MC1132("1.13.2", 404), MC1144("1.14.4", 498), MC1152("1.15.2", 578), - MC1160("1.16", 734); // Вангую, будет релиз - сверю + MC1160("1.16", 735); // Официальный релиз private static final Map VERSIONS; public final String name; public final int protocol;