Improves a lot of comments and variable names
This commit is contained in:
@ -27,12 +27,12 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
public class Server {
|
||||
/**
|
||||
* Available ram sizes. For ServerLauncherGUI dropdown
|
||||
* Available ram sizes. For ServerLauncherGUI combo
|
||||
*/
|
||||
private static final String[] ramList = {
|
||||
"512M", "1G", "2G", "3G", "4G", "5G", "6G", "7G", "8G", "9G", "10G", "11G", "12G", "13G", "14G", "15G", "16G"
|
||||
};
|
||||
private static final String jarDirectory = Main.getApplicationWorkDirectory() + File.separator + "files" + File.separator + "Jars" + File.separator;
|
||||
private static final String[] ramList = {"512M", "1G", "2G", "3G", "4G", "5G", "6G", "7G", "8G", "9G", "10G",
|
||||
"11G", "12G", "13G", "14G", "15G", "16G"};
|
||||
private static final String jarDirectory = Main.getApplicationWorkDirectory() + File.separator + "files" +
|
||||
File.separator + "Jars" + File.separator;
|
||||
|
||||
private final String name;
|
||||
private final ArrayList<String> playerList;
|
||||
@ -67,12 +67,12 @@ public class Server {
|
||||
/**
|
||||
* Initializes a server with the given values
|
||||
*
|
||||
* @param name <p>The name of the server</p>
|
||||
* @param path <p>The file path of the folder containing the server files</p>
|
||||
* @param enabled <p>Whether the server is enabled to start the next time servers are started</p>
|
||||
* @param typeName <p>The name of the server type currently in use on the server</p>
|
||||
* @param serverVersion <p>The currently selected server version for the given server type</p>
|
||||
* @param maxRam <p>The maximum amount of ram the server is allowed to use</p>
|
||||
* @param name <p>The name of the server</p>
|
||||
* @param path <p>The file path of the folder containing the server files</p>
|
||||
* @param enabled <p>Whether the server is enabled to start the next time servers are started</p>
|
||||
* @param typeName <p>The name of the server type currently in use on the server</p>
|
||||
* @param serverVersion <p>The currently selected server version for the given server type</p>
|
||||
* @param maxRam <p>The maximum amount of ram the server is allowed to use</p>
|
||||
*/
|
||||
public Server(String name, String path, boolean enabled, String typeName, String serverVersion, String maxRam) throws ConfigurationException {
|
||||
this.name = name;
|
||||
@ -103,9 +103,9 @@ public class Server {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to stop all enabled servers.
|
||||
* Tries to stop all enabled servers
|
||||
*
|
||||
* @throws IOException If a writer's process is already closed but not null.
|
||||
* @throws IOException <p>If a writer's process is already closed but not null</p>
|
||||
*/
|
||||
public static void stop() throws IOException {
|
||||
for (Collection collection : Main.getController().getCurrentProfile().getCollections()) {
|
||||
@ -329,7 +329,7 @@ public class Server {
|
||||
/**
|
||||
* Removes a player with the selected name from the player list
|
||||
*
|
||||
* @param name The name of the player to remove
|
||||
* @param name <p>The name of the player to remove</p>
|
||||
*/
|
||||
public void removePlayer(String name) {
|
||||
playerList.removeIf(player -> player.equals(name));
|
||||
@ -438,7 +438,7 @@ public class Server {
|
||||
}
|
||||
|
||||
/**
|
||||
* Downloads necessary .jar file for the server.
|
||||
* Downloads necessary .jar file for the server
|
||||
*
|
||||
* @throws FileNotFoundException <p>If the file was not found and could not be acquired</p>
|
||||
*/
|
||||
@ -456,7 +456,7 @@ public class Server {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a command to this server through its writer.
|
||||
* Sends a command to this server through its writer
|
||||
*
|
||||
* @param command <p>Command to send to the server</p>
|
||||
* @throws IOException <p>If write fails</p>
|
||||
|
@ -17,9 +17,9 @@ public class ServerTypeHandler {
|
||||
private static final ArrayList<ServerType> serverTypes = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Gets a list of all server types' names.
|
||||
* Gets a list of all server types' names
|
||||
*
|
||||
* @return <p>A list of strings</p>
|
||||
* @return <p>A list containing the names of all server types</p>
|
||||
*/
|
||||
public static String[] getTypeNames() throws ConfigurationException {
|
||||
if (serverTypes.isEmpty()) {
|
||||
@ -64,7 +64,7 @@ public class ServerTypeHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads valid server types and version from a file, and creates their objects.
|
||||
* Reads valid server types and version from a file, and creates their objects
|
||||
*
|
||||
* @throws ConfigurationException <p>If anything goes wrong</p>
|
||||
*/
|
||||
|
Reference in New Issue
Block a user