Send forwaded data along the Bungee channel.
This commit is contained in:
parent
f53cbc2ab6
commit
f9c4251417
@ -395,19 +395,26 @@ public class UserConnection extends GenericConnection implements ProxiedPlayer
|
|||||||
byte[] data = new byte[len];
|
byte[] data = new byte[len];
|
||||||
in.readFully(data);
|
in.readFully(data);
|
||||||
|
|
||||||
|
|
||||||
|
ByteArrayOutputStream b = new ByteArrayOutputStream();
|
||||||
|
DataOutputStream out = new DataOutputStream(b);
|
||||||
|
out.writeUTF(channel);
|
||||||
|
out.writeShort(data.length);
|
||||||
|
out.write(data);
|
||||||
|
|
||||||
if (target.equals("ALL"))
|
if (target.equals("ALL"))
|
||||||
{
|
{
|
||||||
for (String s : BungeeCord.getInstance().getServers().keySet())
|
for (String s : BungeeCord.getInstance().getServers().keySet())
|
||||||
{
|
{
|
||||||
Server server = BungeeCord.getInstance().getServer(s);
|
Server server = BungeeCord.getInstance().getServer(s);
|
||||||
server.sendData(channel, data);
|
server.sendData("BungeeCord", b.toByteArray());
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
Server server = BungeeCord.getInstance().getServer(target);
|
Server server = BungeeCord.getInstance().getServer(target);
|
||||||
if (server != null)
|
if (server != null)
|
||||||
{
|
{
|
||||||
server.sendData(channel, data);
|
server.sendData("BungeeCord", b.toByteArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user