Implemented the autoStart feature into the ServerManager

This commit is contained in:
2024-02-13 18:51:14 +01:00
parent 36b59f8316
commit 677bde3c82
3 changed files with 39 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ public class ServerConfiguration {
private String version;
private String description;
private int memory;
private boolean autoStart;
/**
* Loads a server configuration from a file
@@ -101,6 +102,14 @@ public class ServerConfiguration {
return memory;
}
/**
* Gets the auto start of the server
* @return The auto start of the server
*/
public boolean isAutoStart() {
return autoStart;
}
/**
* Sets the description of the server
*
@@ -150,4 +159,13 @@ public class ServerConfiguration {
this.name = name;
save();
}
/**
* Sets the auto start of the server
* @param autoStart The new auto start of the server
*/
public void setAutoStart(boolean autoStart) {
this.autoStart = autoStart;
save();
}
}