#2928: Add IPOther special plugin message

This commit is contained in:
Jan Boerman 2020-08-22 17:49:16 +10:00 committed by md_5
parent 64e4f4658a
commit 023f407b0d
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -381,6 +381,25 @@ public class DownstreamBridge extends PacketHandler
out.writeInt( 0 );
}
}
if ( subChannel.equals( "IPOther" ) )
{
ProxiedPlayer player = bungee.getPlayer( in.readUTF() );
if ( player != null )
{
out.writeUTF( "IPOther" );
out.writeUTF( player.getName() );
if ( player.getSocketAddress() instanceof InetSocketAddress )
{
InetSocketAddress address = (InetSocketAddress) player.getSocketAddress();
out.writeUTF( address.getHostString() );
out.writeInt( address.getPort() );
} else
{
out.writeUTF( "unix://" + ( (DomainSocketAddress) player.getSocketAddress() ).path() );
out.writeInt( 0 );
}
}
}
if ( subChannel.equals( "PlayerCount" ) )
{
String target = in.readUTF();