From b0f799d1945f612659d12e7bd4bf302bc817ed91 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:24:42 +0700 Subject: [PATCH] [FIX] UpdatesProvider init --- .../gravit/launchserver/auth/updates/UpdatesProvider.java | 4 ++++ .../gravit/launchserver/config/LaunchServerConfig.java | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/updates/UpdatesProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/updates/UpdatesProvider.java index a6912d1e..572b07d1 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/updates/UpdatesProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/updates/UpdatesProvider.java @@ -42,4 +42,8 @@ public void sync() throws IOException { public abstract void delete(String updateName) throws IOException; public abstract void create(String updateName) throws IOException; + + public void close() { + + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 0b4e6937..f2121ba7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -176,6 +176,10 @@ public void init(LaunchServer.ReloadType type) { server.registerObject("profileProvider", profileProvider); profileProvider.init(server); } + if(updatesProvider != null) { + server.registerObject("updatesProvider", updatesProvider); + updatesProvider.init(server); + } if (components != null) { components.forEach((k, v) -> server.registerObject("component.".concat(k), v)); } @@ -220,6 +224,10 @@ public void close(LaunchServer.ReloadType type) { server.unregisterObject("profileProvider", profileProvider); profileProvider.close(); } + if(updatesProvider != null) { + server.unregisterObject("updatesProvider", updatesProvider); + updatesProvider.close(); + } } public static class JarSignerConf {