[FIX] UpdatesProvider init

This commit is contained in:
Gravita 2024-08-05 03:24:42 +07:00
parent 63f9f8e21d
commit b0f799d194
No known key found for this signature in database
GPG key ID: 543A8F335C9CD633
2 changed files with 12 additions and 0 deletions

View file

@ -42,4 +42,8 @@ public void sync() throws IOException {
public abstract void delete(String updateName) throws IOException; public abstract void delete(String updateName) throws IOException;
public abstract void create(String updateName) throws IOException; public abstract void create(String updateName) throws IOException;
public void close() {
}
} }

View file

@ -176,6 +176,10 @@ public void init(LaunchServer.ReloadType type) {
server.registerObject("profileProvider", profileProvider); server.registerObject("profileProvider", profileProvider);
profileProvider.init(server); profileProvider.init(server);
} }
if(updatesProvider != null) {
server.registerObject("updatesProvider", updatesProvider);
updatesProvider.init(server);
}
if (components != null) { if (components != null) {
components.forEach((k, v) -> server.registerObject("component.".concat(k), v)); components.forEach((k, v) -> server.registerObject("component.".concat(k), v));
} }
@ -220,6 +224,10 @@ public void close(LaunchServer.ReloadType type) {
server.unregisterObject("profileProvider", profileProvider); server.unregisterObject("profileProvider", profileProvider);
profileProvider.close(); profileProvider.close();
} }
if(updatesProvider != null) {
server.unregisterObject("updatesProvider", updatesProvider);
updatesProvider.close();
}
} }
public static class JarSignerConf { public static class JarSignerConf {