mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-06 18:51:21 +01:00
33 lines
1.5 KiB
Diff
33 lines
1.5 KiB
Diff
From 7fc05a47e12839eb256a9141ab122886ca788522 Mon Sep 17 00:00:00 2001
|
|
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
|
|
Date: Wed, 16 Dec 2020 18:24:42 +0800
|
|
Subject: [PATCH] use address & getHostString
|
|
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
|
index 0dd2884d..474551d3 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
|
@@ -542,12 +542,15 @@ public class DownstreamBridge extends PacketHandler
|
|
else if ( subChannel.equals( "ServerIP" ) )
|
|
{
|
|
ServerInfo info = bungee.getServerInfo( in.readUTF() );
|
|
- if ( info != null && !info.getAddress().isUnresolved() )
|
|
+ // FlameCord use address
|
|
+ InetSocketAddress address = info.getAddress();
|
|
+ if ( info != null && !address.isUnresolved() )
|
|
{
|
|
out.writeUTF( "ServerIP" );
|
|
out.writeUTF( info.getName() );
|
|
- out.writeUTF( info.getAddress().getAddress().getHostAddress() );
|
|
- out.writeShort( info.getAddress().getPort() );
|
|
+ // FlameCord - Use getHostString
|
|
+ out.writeUTF( address.getHostString() );
|
|
+ out.writeShort( address.getPort() );
|
|
}
|
|
}
|
|
else if ( subChannel.equals( "KickPlayer" ) )
|
|
--
|
|
2.20.1
|
|
|