From f4e048a5df2445e1ad982acae8aa0033510a8a5c Mon Sep 17 00:00:00 2001 From: Kristian Knarvik Date: Thu, 25 Jan 2018 21:21:06 +0100 Subject: [PATCH] Cleanup --- src/net/knarcraft/serverlauncher/server/Server.java | 10 +++++----- test/ServerTest.java | 5 ----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/net/knarcraft/serverlauncher/server/Server.java b/src/net/knarcraft/serverlauncher/server/Server.java index 52072a3..8be4c8f 100644 --- a/src/net/knarcraft/serverlauncher/server/Server.java +++ b/src/net/knarcraft/serverlauncher/server/Server.java @@ -11,9 +11,9 @@ import java.util.ArrayList; /** * Contains all necessary information to create, run and manage a Minecraft server. * - * @author Kristian Knarvik - * @version 0.0.0.1 - * @since 0.0.0.1 + * @author Kristian Knarvik + * @version 0.0.0.1 + * @since 0.0.0.1 */ public class Server { /** @@ -56,7 +56,7 @@ public class Server { } } - public String getType() { + private String getType() { return this.type.getName() + this.serverVersion + ".jar"; } @@ -138,7 +138,7 @@ public class Server { * * @throws FileNotFoundException if the file was not found and could not be acquired. */ - public void downloadJar() throws FileNotFoundException { + private void downloadJar() throws FileNotFoundException { AdvancedServerType type; File file = new File(this.path + "\\" + this.getType()); Path filePath = Paths.get(this.path + "\\" + this.getType()); diff --git a/test/ServerTest.java b/test/ServerTest.java index f67743a..2004644 100644 --- a/test/ServerTest.java +++ b/test/ServerTest.java @@ -11,8 +11,6 @@ import java.util.ArrayList; * @since 0.0.0.1 */ public class ServerTest { - private static ArrayList servers = new ArrayList<>(); - public static void main(String[] args) { try { ServerType.loadServerTypes(); @@ -27,9 +25,6 @@ public class ServerTest { server1.setType(ServerType.getServerTypes().get(6)); server1.setServerVersion("1.6.4"); server1.setMaxRam("1G"); - servers.add(server1); Server.startServers(); } - - }