From ed10fbd786b481c958050752f1fa0d0fbdb4ca88 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 21 Jun 2021 22:07:38 +0200 Subject: [PATCH] Add Node3 --- .../steamwar/bungeecore/SubserverSystem.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/de/steamwar/bungeecore/SubserverSystem.java b/src/de/steamwar/bungeecore/SubserverSystem.java index e35a134e..b44b331f 100644 --- a/src/de/steamwar/bungeecore/SubserverSystem.java +++ b/src/de/steamwar/bungeecore/SubserverSystem.java @@ -239,24 +239,25 @@ public class SubserverSystem { List cmd = new ArrayList<>(); boolean jdk11 = serverJar.contains("1.15.2"); - boolean notSteamwarStart = !steamwarStartAvailable(); - if (notSteamwarStart && remoteStartAvailable("lx")) { + boolean fallback = false; + if (!steamwarStartAvailable()) { cmd.add("ssh"); cmd.add("-L"); cmd.add(port + ":localhost:" + port); - cmd.add("lx"); - cmd.add("cd"); - cmd.add(directory.getPath()); - cmd.add(";"); - } else if (notSteamwarStart && remoteStartAvailable("az")) { - cmd.add("ssh"); - cmd.add("-L"); - cmd.add(port + ":localhost:" + port); - cmd.add("az"); + if (remoteStartAvailable("lx")) { + cmd.add("lx"); + } else if (remoteStartAvailable("az")) { + cmd.add("az"); + } else { + fallback = true; + } cmd.add("cd"); cmd.add(directory.getPath()); cmd.add(";"); } + if (fallback) { + cmd.clear(); + } if(jdk11) cmd.add("/usr/lib/jvm/java-11-openjdk-amd64/bin/java");