Ensured Client username updating in ClientModle for ui

This commit is contained in:
Seraina 2022-04-17 17:22:15 +02:00
parent 8c9d40a6d8
commit bc77f5dad2

View File

@ -143,6 +143,7 @@ public class ClientHandler implements Runnable {
*/ */
public void setUsernameOnLogin(String name) { public void setUsernameOnLogin(String name) {
this.clientUserName = nameDuplicateChecker.checkName(name); this.clientUserName = nameDuplicateChecker.checkName(name);
sendMsgToClient(Protocol.changedUserName + "$" + clientUserName);
broadcastAnnouncementToAll(clientUserName + " has joined the Server"); broadcastAnnouncementToAll(clientUserName + " has joined the Server");
/* The following lines could be un-commented to provide Lobby information on login /* The following lines could be un-commented to provide Lobby information on login