mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 01:57:55 +01:00
Add ConnectOther channel for moving other players from a plugin
This commit is contained in:
parent
99f361ca77
commit
d8c92cd311
@ -244,6 +244,18 @@ public class DownstreamBridge extends PacketHandler
|
|||||||
con.connect( server );
|
con.connect( server );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( subChannel.equals( "ConnectOther" ) )
|
||||||
|
{
|
||||||
|
ProxiedPlayer player = bungee.getPlayer( in.readUTF() );
|
||||||
|
if ( player != null )
|
||||||
|
{
|
||||||
|
ServerInfo server = bungee.getServerInfo( in.readUTF() );
|
||||||
|
if ( server != null )
|
||||||
|
{
|
||||||
|
player.connect( server );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if ( subChannel.equals( "IP" ) )
|
if ( subChannel.equals( "IP" ) )
|
||||||
{
|
{
|
||||||
out.writeUTF( "IP" );
|
out.writeUTF( "IP" );
|
||||||
|
Loading…
Reference in New Issue
Block a user