Launcher/ServerWrapper/src/main/java/ru/gravit/launcher/server/ModulesManager.java

21 lines
751 B
Java
Raw Normal View History

2018-09-17 10:07:32 +03:00
package ru.gravit.launcher.server;
2019-01-12 03:13:24 +03:00
import ru.gravit.launcher.managers.ModulesConfigManager;
import ru.gravit.launcher.managers.SimpleModuleManager;
2018-12-20 18:45:01 +03:00
import ru.gravit.utils.PublicURLClassLoader;
2018-09-17 10:07:32 +03:00
import java.net.URL;
2019-01-12 03:13:24 +03:00
import java.nio.file.Paths;
2018-09-17 10:07:32 +03:00
import java.util.ArrayList;
public class ModulesManager extends SimpleModuleManager {
2019-01-12 03:13:24 +03:00
public ModulesConfigManager modulesConfigManager;
2019-01-15 06:35:39 +03:00
2018-09-17 10:07:32 +03:00
public ModulesManager(ServerWrapper wrapper) {
modules = new ArrayList<>();
2019-01-12 03:13:24 +03:00
modulesConfigManager = new ModulesConfigManager(Paths.get("modules-config"));
classloader = new PublicURLClassLoader(new URL[0], ClassLoader.getSystemClassLoader());
2019-01-12 03:13:24 +03:00
context = new ServerModuleContext(wrapper, classloader, modulesConfigManager);
2018-09-17 10:07:32 +03:00
}
}