From d8c92cd3115457164a974d9c8ac091caba5699c3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 25 Aug 2013 10:23:17 +1000 Subject: [PATCH] Add ConnectOther channel for moving other players from a plugin --- .../net/md_5/bungee/connection/DownstreamBridge.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java index 09465577e..2e9286d88 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java @@ -244,6 +244,18 @@ public class DownstreamBridge extends PacketHandler 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" ) ) { out.writeUTF( "IP" );