diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 0cff19d2..122a7816 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -332,7 +332,7 @@ function updateProfilesList(profiles) { serverList.getChildren().clear(); var index = 0; profiles.forEach(function(profile, i, arr) { - pingers[profile] = new ServerPinger(profile.getServerSocketAddress(), profile.getVersion()); + pingers[profile] = new ServerPinger(profile); var serverBtn = new javafx.scene.control.ToggleButton(profile); diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ServerPinger.java b/Launcher/src/main/java/ru/gravit/launcher/client/ServerPinger.java index 6052e4eb..69928887 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ServerPinger.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ServerPinger.java @@ -76,9 +76,9 @@ private static void writeUTF16String(HOutput output, String s) throws IOExceptio private Instant cacheTime = null; @LauncherAPI - public ServerPinger(InetSocketAddress address, ClientProfile.Version version) { - this.address = Objects.requireNonNull(address, "address"); - this.version = Objects.requireNonNull(version, "version"); + public ServerPinger(ClientProfile profile) { + this.address = Objects.requireNonNull(profile.getServerSocketAddress(), "address"); + this.version = Objects.requireNonNull(profile.getVersion(), "version"); } private Result doPing() throws IOException {