From a87cb6f528e2459f8e8d5ec80ff95722d055aea1 Mon Sep 17 00:00:00 2001 From: 132ikl <132@ikl.sh> Date: Tue, 26 May 2020 21:40:02 -0400 Subject: [PATCH] Revert name normalization --- .../polychat/server/info/OnlineServers.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Server/src/club/moddedminecraft/polychat/server/info/OnlineServers.java b/Server/src/club/moddedminecraft/polychat/server/info/OnlineServers.java index c651164..101c843 100644 --- a/Server/src/club/moddedminecraft/polychat/server/info/OnlineServers.java +++ b/Server/src/club/moddedminecraft/polychat/server/info/OnlineServers.java @@ -56,7 +56,7 @@ public OnlineServer getServerNormalized(String serverID) { //Adds a server to the list public void serverConnected(String serverID, String serverName, String serverAddress, int maxPlayers, MessageBus messageBus) { - OnlineServer toRemove = getServerNormalized(serverID); + OnlineServer toRemove = serverMap.get(serverID); if (toRemove != null) { onlineServers.remove(toRemove); } @@ -67,7 +67,7 @@ public void serverConnected(String serverID, String serverName, String serverAdd //Marks a server as online public void serverOnline(String serverID) { - OnlineServer server = getServerNormalized(serverID); + OnlineServer server = serverMap.get(serverID); if (server != null) { server.setStarted(); } @@ -75,27 +75,27 @@ public void serverOnline(String serverID) { //Removes a server as it went offline public void serverOffline(String serverID) { - OnlineServer toRemove = getServerNormalized(serverID); + OnlineServer toRemove = serverMap.get(serverID); onlineServers.remove(toRemove); serverMap.remove(serverID); } public void updatePlayerList(String serverID, ArrayList playerList) { - OnlineServer server = getServerNormalized(serverID); + OnlineServer server = serverMap.get(serverID); if (server != null) { server.updatePlayerList(playerList); } } public void playerJoin(String serverID, String username) { - OnlineServer server = getServerNormalized(serverID); + OnlineServer server = serverMap.get(serverID); if (server != null) { server.onlinePlayers.add(username); } } public void playerLeave(String serverID, String username) { - OnlineServer server = getServerNormalized(serverID); + OnlineServer server = serverMap.get(serverID); if (server != null) { server.onlinePlayers.remove(username); }