Fixed spacing.
Fixed checking for waitSave if. Fixed static reference.
This commit is contained in:
parent
8eab14a61f
commit
0d256be93f
Binary file not shown.
@ -74,7 +74,7 @@ public class Main {
|
|||||||
private Integer yOffset = null;
|
private Integer yOffset = null;
|
||||||
private boolean verbose = false;
|
private boolean verbose = false;
|
||||||
private boolean alternate = false;
|
private boolean alternate = false;
|
||||||
private boolean waitSave = false;
|
private static boolean waitSave = false;
|
||||||
private static boolean ignoreWarnings = false;
|
private static boolean ignoreWarnings = false;
|
||||||
private static LongTag randomSeed = null;
|
private static LongTag randomSeed = null;
|
||||||
|
|
||||||
@ -274,13 +274,12 @@ public class Main {
|
|||||||
} else if (line.substring(0, pos).toLowerCase().equals("dim-9")) {
|
} else if (line.substring(0, pos).toLowerCase().equals("dim-9")) {
|
||||||
level_9 = line.substring(pos + 1, end);
|
level_9 = line.substring(pos + 1, end);
|
||||||
} else if (line.substring(0, pos).toLowerCase().equals("waitsave")) {
|
} else if (line.substring(0, pos).toLowerCase().equals("waitsave")) {
|
||||||
string wstmp = line.toLowerCase().substring(pos + 1, end);
|
String wstmp = line.toLowerCase().substring(pos + 1, end);
|
||||||
if (wstmp == "true"){
|
if (wstmp.equals( "true" ) ){
|
||||||
waitSave = true;
|
waitSave = true;
|
||||||
} else {
|
} else {
|
||||||
waitSave = false;
|
waitSave = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -668,13 +667,13 @@ public class Main {
|
|||||||
if (line.contains(doneText)) { //EDITED By Morlok8k for Minecraft 1.3+ Beta
|
if (line.contains(doneText)) { //EDITED By Morlok8k for Minecraft 1.3+ Beta
|
||||||
OutputStream outputStream = process.getOutputStream();
|
OutputStream outputStream = process.getOutputStream();
|
||||||
if (waitSave) {
|
if (waitSave) {
|
||||||
System.out.println("Waiting 30 seconds to save.");
|
System.out.println("Waiting 30 seconds to save.");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep( 30000 );
|
Thread.sleep( 30000 );
|
||||||
} catch ( InterruptedException e ) {
|
} catch ( InterruptedException e ) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("Saving server data...");
|
System.out.println("Saving server data...");
|
||||||
@ -688,12 +687,12 @@ public class Main {
|
|||||||
outputStream.write(stop);
|
outputStream.write(stop);
|
||||||
outputStream.flush();
|
outputStream.flush();
|
||||||
if (waitSave) {
|
if (waitSave) {
|
||||||
System.out.println("Waiting 10 seconds for save.");
|
System.out.println("Waiting 10 seconds for save.");
|
||||||
try {
|
try {
|
||||||
Thread.sleep( 10000 );
|
Thread.sleep( 10000 );
|
||||||
} catch ( InterruptedException e ) {
|
} catch ( InterruptedException e ) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -756,15 +755,15 @@ public class Main {
|
|||||||
|
|
||||||
if (line.contains(doneText)) { // now this is configurable!
|
if (line.contains(doneText)) { // now this is configurable!
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
if (waitSave) {
|
if ( waitSave ) {
|
||||||
System.out.println("Waiting 30 seconds for save.");
|
System.out.println( "Waiting 30 seconds for save." );
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Thread.sleep( 30000 );
|
Thread.sleep( 30000 );
|
||||||
} catch ( InterruptedException e ) {
|
} catch ( InterruptedException e ) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("Saving server data.");
|
System.out.println("Saving server data.");
|
||||||
outputStream.write(saveAll);
|
outputStream.write(saveAll);
|
||||||
outputStream.flush();
|
outputStream.flush();
|
||||||
@ -775,13 +774,13 @@ public class Main {
|
|||||||
outputStream.flush();
|
outputStream.flush();
|
||||||
//outputStream.close();
|
//outputStream.close();
|
||||||
|
|
||||||
if (waitSave) {
|
if ( waitSave ) {
|
||||||
System.out.println("Waiting 10 seconds for save.");
|
System.out.println( "Waiting 10 seconds for save." );
|
||||||
try {
|
try {
|
||||||
Thread.sleep( 10000 );
|
Thread.sleep( 10000 );
|
||||||
} catch ( InterruptedException e ) {
|
} catch ( InterruptedException e ) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ignoreWarnings == false) {
|
if (ignoreWarnings == false) {
|
||||||
|
Reference in New Issue
Block a user