Changed the way LISTL was implemented since it caused problems for the parser of the client.

This commit is contained in:
Sebastian Lenzlinger 2022-04-08 19:12:02 +02:00
parent a10ea16d35
commit e23a749f55
2 changed files with 3 additions and 3 deletions

View File

@ -243,12 +243,12 @@ public class ClientHandler implements Runnable {
LOGGER.debug("No open lobbies"); LOGGER.debug("No open lobbies");
} else { } else {
for (Lobby l : serverData.getAllLobbies()) { for (Lobby l : serverData.getAllLobbies()) {
response.append(l.getIdAndAdminForList()); sendMsgToClient(response + l.getIdAndAdminAndFormat());
} }
} }
LOGGER.debug( LOGGER.debug(
"RESPONSE TO LISTL: " + response.toString() + " requested by: " + this.clientUserName); "RESPONSE TO LISTL: " + response.toString() + " requested by: " + this.clientUserName);
sendMsgToClient(response.toString()); //sendMsgToClient(response.toString());
} }
/** /**

View File

@ -93,7 +93,7 @@ public class Lobby {
* *
* @return a string formatted for the clients convenients. * @return a string formatted for the clients convenients.
*/ */
public String getIdAndAdminForList() { public String getIdAndAdminAndFormat() {
StringBuilder response = new StringBuilder(); StringBuilder response = new StringBuilder();
response.append("Lobby ID: "); response.append("Lobby ID: ");
response.append(this.lobbyID); response.append(this.lobbyID);