diff --git a/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/StartMenuScreen.java b/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/StartMenuScreen.java index ecf0586..217ce66 100644 --- a/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/StartMenuScreen.java +++ b/src/main/java/inf112/fiasko/roborally/gamewrapper/screens/StartMenuScreen.java @@ -19,7 +19,7 @@ import java.io.IOException; */ public class StartMenuScreen extends AbstractScreen { private final RoboRallyWrapper roboRallyWrapper; - private TextField textInput; + private final TextField textInput; /** * Instantiates a new start menu screen diff --git a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java index 2d1d401..c82898c 100644 --- a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java +++ b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java @@ -31,8 +31,8 @@ public class RoboRallyClient { /** * Connects to a Robo Rally server * - * @param ipAddress The ip address of the server to join - * @param serverPort The port the server is hosted on + * @param ipAddress The ip address of the server to join + * @param serverPort The port the server is hosted on * @throws IOException If the server cannot be connected to */ public void connect(String ipAddress, int serverPort) throws IOException { diff --git a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServerListener.java b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServerListener.java index c38cab9..0b989d5 100644 --- a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServerListener.java +++ b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServerListener.java @@ -209,7 +209,8 @@ class RoboRallyServerListener extends Listener { @Override public void disconnected(Connection connection) { - if (deadPlayers.contains(connection) || !clients.keySet().contains(connection)) { + if (deadPlayers.contains(connection) || !clients.containsKey(connection) || + !playerNames.containsKey(connection)) { //Remove all traces of the player ever existing clients.remove(connection); playerNames.remove(connection);