geforkt von SteamWar/BungeeCore
Merge branch 'master' into BetterTablistFooter
Dieser Commit ist enthalten in:
Commit
0769057d8f
@ -239,15 +239,25 @@ public class SubserverSystem {
|
||||
List<String> cmd = new ArrayList<>();
|
||||
boolean jdk11 = serverJar.contains("1.15.2");
|
||||
|
||||
if(!steamwarStartAvailable() && lixfelStartAvailable()){
|
||||
boolean fallback = false;
|
||||
if (!steamwarStartAvailable()) {
|
||||
cmd.add("ssh");
|
||||
cmd.add("-L");
|
||||
cmd.add(port + ":localhost:" + port);
|
||||
cmd.add("lx");
|
||||
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");
|
||||
@ -278,8 +288,8 @@ public class SubserverSystem {
|
||||
return LoadEvaluation.getCPULoad() < 0.8 && LoadEvaluation.getRamPercentage() < 0.8;
|
||||
}
|
||||
|
||||
private static boolean lixfelStartAvailable(){
|
||||
return LoadEvaluation.getRemoteCPULoad("lx") < 0.8 && LoadEvaluation.getRemoteRamPercentage("lx") < 0.8;
|
||||
private static boolean remoteStartAvailable(String remote) {
|
||||
return LoadEvaluation.getRemoteCPULoad(remote) < 0.8 && LoadEvaluation.getRemoteRamPercentage(remote) < 0.8;
|
||||
}
|
||||
|
||||
private static boolean bauRunning(ProxiedPlayer p, UUID owner){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren