SteamWar/BauSystem
Archiviert
13
0

gradle #252

Manuell gemergt
SteamWar hat 35 Commits von gradle nach master 2021-05-22 21:04:38 +02:00 zusammengeführt
Nur Änderungen aus Commit 534673cdc5 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -130,7 +130,7 @@ def shell(String command) {
}
def serverStart() {
def proc = shell("ssh ${hostname} \"./mc Dev1.15\"")
def proc = shell("ssh -t ${hostname} \"./mc Dev1.15\"")
Thread outputThread = proc.consumeProcessOutputStream(System.out)
outputThread.setName("OutputThread")
@ -138,13 +138,16 @@ def serverStart() {
Thread inputThread = new Thread(new Runnable() {
@Override
void run() {
// Reader reader = System.in.newReader()
Reader reader = System.in.newReader()
Writer writer = proc.getOutputStream().newWriter()
while (true) {
//String s = reader.readLine()
Thread.sleep(10000)
writer.write("stop\n")
writer.flush()
try {
while (true) {
String s = reader.readLine()
writer.write(s + "\n")
writer.flush()
}
} catch (InterruptedIOException e) {
}
}
})
@ -162,5 +165,7 @@ def serverStart() {
def answer(String question) {
while (System.in.available() > 0) System.in.read()
println(question)
return "Yy".contains(((char)System.in.read()).toString())
boolean valid = "Yy".contains(((char)System.in.read()).toString())
while (System.in.available() > 0) System.in.read()
return valid
}