diff --git a/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java b/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java index bcb92bbd..e8a48d0b 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java @@ -77,6 +77,9 @@ public void complete(LineReader reader, ParsedLine line, List candida }); } else { Command target = findCommand(line.words().get(0)); + if(target == null) { + return; + } List words = line.words(); List candidates1 = target.complete(words.subList(1, words.size()), line.wordIndex() - 1, completeWord); candidates.addAll(candidates1); diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index ee104166..97eddf74 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -156,7 +156,9 @@ public void run(String... args) throws Throwable { LogHelper.info("ServerWrapper: LaunchServer address: %s. Title: %s", config.address, Launcher.profile != null ? Launcher.profile.getTitle() : "unknown"); LogHelper.info("Minecraft Version (for profile): %s", wrapper.profile == null ? "unknown" : wrapper.profile.getVersion().name); String[] real_args; - if (args.length > 0) { + if(config.args != null && config.args.size() > 0) { + real_args = config.args.toArray(new String[0]); + } else if (args.length > 0) { real_args = new String[args.length - 1]; System.arraycopy(args, 1, real_args, 0, args.length - 1); } else real_args = args; diff --git a/modules b/modules index 56ad1f1d..84676190 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 56ad1f1d6a9d72e17f8283b077a9b4b53bfc5eb0 +Subproject commit 84676190f36dfe087e0523542c2167611c80b57a