From e42a88ded904968a3540131cf0d0ab152a9aff03 Mon Sep 17 00:00:00 2001 From: Gravit Date: Tue, 27 Nov 2018 20:33:41 +0700 Subject: [PATCH] =?UTF-8?q?User-firendly=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20ServerWrapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ru/gravit/launcher/server/ServerWrapper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java index 681b25d8..1b54ba2a 100644 --- a/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/ru/gravit/launcher/server/ServerWrapper.java @@ -94,6 +94,10 @@ public static void main(String[] args) throws Throwable { CommonHelper.newThread("Server Auth Thread", true, () -> ServerWrapper.loopAuth(wrapper, config.reconnectCount, config.reconnectSleep)); modulesManager.initModules(); String classname = 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"); + } Class mainClass; if (config.customClassLoader) { @SuppressWarnings("unchecked") @@ -106,7 +110,9 @@ public static void main(String[] args) throws Throwable { String[] real_args = new String[args.length - 1]; System.arraycopy(args, 1, real_args, 0, args.length - 1); modulesManager.postInitModules(); - LogHelper.debug("Invoke main method"); + LogHelper.info("ServerWrapper: Project %s, LaunchServer address: %s port %d. Title: %s",config.projectname,config.address,config.port,config.title); + LogHelper.info("Minecraft Version (for profile): %s",wrapper.profile.getVersion().name); + LogHelper.debug("Invoke main method %s", mainClass.getName()); mainMethod.invoke(real_args); }