Slightly more optimized getChannels

This commit is contained in:
md_5 2013-05-25 16:52:41 +10:00
parent 122987dd83
commit 80c22027de

View File

@ -426,14 +426,7 @@ public class BungeeCord extends ProxyServer
public PacketFAPluginMessage registerChannels() public PacketFAPluginMessage registerChannels()
{ {
StringBuilder sb = new StringBuilder(); return new PacketFAPluginMessage( "REGISTER", Util.format( pluginChannels, "\00" ).getBytes() );
for ( String s : getChannels() )
{
sb.append( s );
sb.append( '\00' );
}
byte[] payload = sb.substring( 0, sb.length() - 1 ).getBytes();
return new PacketFAPluginMessage( "REGISTER", payload );
} }
@Override @Override