From b8be6d4ef667a7e1a33327364048f388a4c23e9b Mon Sep 17 00:00:00 2001 From: Gravita Date: Fri, 12 Feb 2021 21:33:05 +0700 Subject: [PATCH] [FEATURE] LaunchServer save command --- .../main/java/pro/gravit/launchserver/LaunchServer.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 202459d6..724d8a31 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -293,6 +293,15 @@ public void invoke(String... args) throws Exception { } }; commands.put("reload", reload); + SubCommand save = new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + launchServerConfigManager.writeConfig(config); + launchServerConfigManager.writeRuntimeConfig(runtime); + LogHelper.info("LaunchServerConfig saved"); + } + }; + commands.put("save", save); return commands; }