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) {
|
public void setServerVersion(String serverVersion) {
|
||||||
|
String[] versions = this.type.getVersions();
|
||||||
|
for (String version : versions) {
|
||||||
|
if (version.equals(serverVersion)) {
|
||||||
this.serverVersion = serverVersion;
|
this.serverVersion = serverVersion;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setMaxRam(String ram) {
|
public void setMaxRam(String ram) {
|
||||||
this.maxRam = ram;
|
this.maxRam = ram;
|
||||||
|
@ -43,13 +43,13 @@ public class ServerTest {
|
|||||||
if (server.isEnabled()) {
|
if (server.isEnabled()) {
|
||||||
String path = server.getPath();
|
String path = server.getPath();
|
||||||
String type = server.getType();
|
String type = server.getType();
|
||||||
/* try {
|
try {
|
||||||
server.downloadJar();
|
server.downloadJar();
|
||||||
System.out.println("File downloaded.");
|
System.out.println("File downloaded.");
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
System.out.println("File was not found.");
|
System.out.println("File was not found.");
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
String ram = server.maxRam();
|
String ram = server.maxRam();
|
||||||
Runtime rt = Runtime.getRuntime();
|
Runtime rt = Runtime.getRuntime();
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user