Add GetServers channel.

This commit is contained in:
md_5 2013-01-27 10:05:22 +11:00
parent 8f090b6692
commit 0985794eab

View File

@ -463,6 +463,22 @@ public class UserConnection extends GenericConnection implements ProxiedPlayer
getServer().sendData("BungeeCord", b.toByteArray()); getServer().sendData("BungeeCord", b.toByteArray());
} }
} }
if (subChannel.equals("GetServers"))
{
ByteArrayOutputStream b = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(b);
out.writeUTF("GetServers");
StringBuilder sb = new StringBuilder();
for (String server : ProxyServer.getInstance().getServers().keySet())
{
sb.append(server);
sb.append(",");
}
out.writeUTF(sb.substring(0, sb.length() - 1));
getServer().sendData("BungeeCord", b.toByteArray());
}
continue; continue;
} }
} }