Archiviert
1
0

Java 8 for 1.8 - 1.10

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-01-29 13:56:24 +01:00
Ursprung bf97d889a5
Commit 4e6daaa8c0

Datei anzeigen

@ -22,10 +22,7 @@ package de.steamwar.bungeecore;
import net.md_5.bungee.api.ProxyServer;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.logging.Level;
@ -34,6 +31,14 @@ public abstract class Node {
private static final List<String> OPENJ9_ARGS = Arrays.asList("-Xgc:excessiveGCratio=80", "-Xsyslog:none", "-Xtrace:none", "-Xdisableexplicitgc", "-XX:+AlwaysPreTouch", "-XX:+CompactStrings", "-XX:-HeapDumpOnOutOfMemory", "-XX:+ExitOnOutOfMemoryError", "-Dlog4j.configurationFile=log4j2.xml");
private static final double MIN_FREE_MEM = 4.0 * 1024 * 1024; // 4 GiB
private static final Set<String> JAVA_8 = new HashSet<>();
static {
JAVA_8.add("paper-1.8.8.jar");
JAVA_8.add("paper-1.10.2.jar");
JAVA_8.add("spigot-1.8.8.jar");
JAVA_8.add("spigot-1.9.4.jar");
JAVA_8.add("spigot-1.10.2.jar");
}
private static final List<Node> nodes = new ArrayList<>();
public static Node local = null;
@ -74,7 +79,10 @@ public abstract class Node {
public abstract double getLoad();
protected void constructServerstart(File directory, List<String> cmd, String serverJar, String worldDir, String levelName, int port, String xmx, String... dParams) {
cmd.add("java");
if (JAVA_8.contains(serverJar))
cmd.add("/usr/lib/jvm/java-8-openj9-amd64/bin/java");
else
cmd.add("java");
for(String param : dParams){
cmd.add("-D" + param);