Merge pull request #372 from roblabla/patch-2
Add global PlayerCount if target is "ALL"
This commit is contained in:
commit
4cb46c6e5c
@ -264,14 +264,21 @@ public class DownstreamBridge extends PacketHandler
|
||||
}
|
||||
if ( subChannel.equals( "PlayerCount" ) )
|
||||
{
|
||||
ServerInfo server = bungee.getServerInfo( in.readUTF() );
|
||||
String target = in.readUTF();
|
||||
out.writeUTF( "PlayerCount" );
|
||||
if ( target.equals( "ALL" ) )
|
||||
{
|
||||
out.writeInt( bungee.getPlayers().size() );
|
||||
} else
|
||||
{
|
||||
ServerInfo server = bungee.getServerInfo( target );
|
||||
if ( server != null )
|
||||
{
|
||||
out.writeUTF( "PlayerCount" );
|
||||
out.writeUTF( server.getName() );
|
||||
out.writeInt( server.getPlayers().size() );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( subChannel.equals( "PlayerList" ) )
|
||||
{
|
||||
String target = in.readUTF();
|
||||
|
Loading…
Reference in New Issue
Block a user