Add server version check
This commit is contained in:
parent
0c2c26e153
commit
3c3a6a3efa
@ -79,8 +79,13 @@ public class Server {
|
||||
}
|
||||
|
||||
public void setServerVersion(String serverVersion) {
|
||||
String[] versions = this.type.getVersions();
|
||||
for (String version : versions) {
|
||||
if (version.equals(serverVersion)) {
|
||||
this.serverVersion = serverVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setMaxRam(String ram) {
|
||||
this.maxRam = ram;
|
||||
|
@ -43,13 +43,13 @@ public class ServerTest {
|
||||
if (server.isEnabled()) {
|
||||
String path = server.getPath();
|
||||
String type = server.getType();
|
||||
/* try {
|
||||
try {
|
||||
server.downloadJar();
|
||||
System.out.println("File downloaded.");
|
||||
} catch (FileNotFoundException e) {
|
||||
System.out.println("File was not found.");
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
String ram = server.maxRam();
|
||||
Runtime rt = Runtime.getRuntime();
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user