mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
Launcher: remove double sorting version list
This commit is contained in:
parent
7e4db08043
commit
5cd5fa34b7
@ -30,14 +30,13 @@ import javafx.stage.Stage;
|
||||
import javafx.util.Callback;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Comparator;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class Launcher extends Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
public static void main() {
|
||||
launch();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -46,8 +45,7 @@ public class Launcher extends Application {
|
||||
for (Map.Entry<Integer, Version> version : Versions.getVersionMap().entrySet()) {
|
||||
GUITools.versions.add(version.getValue());
|
||||
}
|
||||
Comparator<Version> comparator = Comparator.comparingInt(Version::getProtocolVersion);
|
||||
FXCollections.sort(GUITools.versions, comparator);
|
||||
|
||||
GUITools.versions.sort((a, b) -> {
|
||||
if (a.getProtocolVersion() == -1) {
|
||||
return -Integer.MAX_VALUE;
|
||||
|
@ -84,7 +84,7 @@ public class Minosoft {
|
||||
}
|
||||
|
||||
serverList = config.getServers();
|
||||
Launcher.main(args);
|
||||
Launcher.main();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,6 +110,7 @@ public class ServerListCell extends ListCell<Server> implements Initializable {
|
||||
// Offline
|
||||
players.setText("");
|
||||
version.setText("Offline");
|
||||
motd.setText("Could not connect to server!");
|
||||
optionsConnect.setDisable(true);
|
||||
canConnect = false;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user