(fix) problem with refreshing featured servers

This commit is contained in:
kirillsaint 2024-02-04 00:19:27 +06:00
parent 26caaa9e8d
commit 5782748a31
2 changed files with 9 additions and 0 deletions

View File

@ -8,4 +8,12 @@ public class ServerDataFeature extends ServerData {
public ServerDataFeature(String serverName, String serverIp) { public ServerDataFeature(String serverName, String serverIp) {
super(serverName, serverIp, false); super(serverName, serverIp, false);
} }
public void resetData() {
this.field_78841_f = false;
this.pingToServer = 0;
this.populationInfo = null;
this.playerList = null;
this.serverMOTD = null;
}
} }

View File

@ -89,6 +89,7 @@ public class SilentMultiplayerGui extends SilentScreen {
public void getServers() { public void getServers() {
servers.clear(); servers.clear();
for(ServerDataFeature serverDataFeature : Client.getInstance().getFeaturedServers()) { for(ServerDataFeature serverDataFeature : Client.getInstance().getFeaturedServers()) {
serverDataFeature.resetData();
servers.add(new ServerComponent(this, serverDataFeature)); servers.add(new ServerComponent(this, serverDataFeature));
} }
for (int i = 0; i < savedServerList.countServers(); ++i) for (int i = 0; i < savedServerList.countServers(); ++i)