Archiviert
1
0

Adaption to steamwar Systems

Dieser Commit ist enthalten in:
Lixfel 2019-05-28 16:29:58 +02:00
Ursprung 28aa1504f0
Commit 5a16e51b39
2 geänderte Dateien mit 5 neuen und 6 gelöschten Zeilen

1
.gitignore vendored
Datei anzeigen

@ -1,3 +1,2 @@
*.iml
.idea .idea
target target

Datei anzeigen

@ -35,7 +35,7 @@ public class Arena implements Runnable{
serverName = modus.name() + id; serverName = modus.name() + id;
int port = 2500 + arenenNummer; int port = 2500 + arenenNummer;
ProcessBuilder pb = new ProcessBuilder( ProcessBuilder pb = new ProcessBuilder(
"/home/netuser/mc", "/home/minecraft/mc",
"-a", modus.name(), serverName, Integer.toString(port)); "-a", modus.name(), serverName, Integer.toString(port));
try{ try{
p = pb.start(); p = pb.start();
@ -112,8 +112,8 @@ public class Arena implements Runnable{
String line = ""; String line = "";
while (!started && (line = reader.readLine()) != null) { while (!started && (line = reader.readLine()) != null) {
//started = line.contains(" INFO]: Done ("); Problematisch started = line.contains(" INFO]: Done ("); //Problematisch
started = line.contains("INFO]: [AAC] AAC has been enabled."); //started = line.contains("INFO]: [AAC] AAC has been enabled.");
} }
if(line == null){ if(line == null){
@ -121,11 +121,11 @@ public class Arena implements Runnable{
return; return;
} }
Thread.sleep(200); Thread.sleep(1000);
sendPlayer(cachedPlayers.get(0)); sendPlayer(cachedPlayers.get(0));
Thread.sleep(1000); Thread.sleep(200);
for(int i = 1; i < cachedPlayers.size(); i++){ for(int i = 1; i < cachedPlayers.size(); i++){
sendPlayer(cachedPlayers.get(i)); sendPlayer(cachedPlayers.get(i));