mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Фиксы ServerWrapper
This commit is contained in:
parent
f812129d81
commit
bac74a7d4f
2 changed files with 4 additions and 2 deletions
|
@ -87,6 +87,7 @@ public static void main(String[] args) throws Throwable {
|
|||
modulesManager.preInitModules();
|
||||
LogHelper.debug("Read ServerWrapperConfig.json");
|
||||
gsonBuiler = new GsonBuilder();
|
||||
gsonBuiler.setPrettyPrinting();
|
||||
gson = gsonBuiler.create();
|
||||
generateConfigIfNotExists();
|
||||
try(Reader reader = IOHelper.newReader(configFile))
|
||||
|
@ -99,7 +100,7 @@ public static void main(String[] args) throws Throwable {
|
|||
else
|
||||
CommonHelper.newThread("Server Auth Thread", true, () -> ServerWrapper.loopAuth(wrapper, config.reconnectCount, config.reconnectSleep));
|
||||
modulesManager.initModules();
|
||||
String classname = config.mainclass.isEmpty() ? args[0] : config.mainclass;
|
||||
String classname = (config.mainclass == null || config.mainclass.isEmpty()) ? args[0] : config.mainclass;
|
||||
if (classname.length() == 0) {
|
||||
LogHelper.error("MainClass not found. Please set MainClass for ServerWrapper.cfg or first commandline argument");
|
||||
}
|
||||
|
@ -152,6 +153,7 @@ private static void generateConfigIfNotExists() throws IOException {
|
|||
newConfig.port = 7240;
|
||||
newConfig.login = "login";
|
||||
newConfig.password = "password";
|
||||
newConfig.mainclass = "";
|
||||
//try(Reader reader = IOHelper.newReader(IOHelper.getResourceURL("ru/gravit/launcher/server/ServerWrapper.cfg")))
|
||||
//{
|
||||
// newConfig = gson.fromJson(reader,Config.class);
|
||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit ec1431605c4951ace5cbd2ab392b67cea25bddd5
|
||||
Subproject commit eec958f2c5edbc7c053686ab7cebaab8dbca2778
|
Loading…
Reference in a new issue