Fix launcher verification session check and socket IP resolution
This commit is contained in:
1 parent
522e3a5717
commit
c7aa563dac
6 files changed
+185
-29
No files matched your search
@@ -32,8 +32,10 @@ public final class Bridge {
|
||||
public static CompletableFuture<String> login(UUID uuid, String name, SocketAddress address) {
|
||||
Integration current = integration;
|
||||
if (current == null) return CompletableFuture.completedFuture(Integration.UNAVAILABLE);
|
||||
String ip = address instanceof InetSocketAddress socket && socket.getAddress() != null
|
||||
? socket.getAddress().getHostAddress() : null;
|
||||
String ip = null;
|
||||
if (address instanceof InetSocketAddress socket) {
|
||||
ip = socket.getAddress() != null ? socket.getAddress().getHostAddress() : socket.getHostString();
|
||||
}
|
||||
return current.login(uuid, name, ip);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user