Bridge packets both ways.

This commit is contained in:
md_5 2013-03-09 14:27:24 +11:00
parent f0a19e0f45
commit f0766ebcfb
3 changed files with 4 additions and 2 deletions

View File

@ -98,6 +98,7 @@ public class ServerConnector extends PacketHandler
// Add to new server
target.addPlayer( user );
user.setServer( server );
ch.pipeline().get( HandlerBoss.class ).setHandler( new DownstreamBridge( bungee, user ) );
}

View File

@ -14,6 +14,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.Synchronized;
@ -33,13 +34,14 @@ public final class UserConnection implements ProxiedPlayer
public final Packet2Handshake handshake;
private final ProxyServer bungee;
public final Channel ch;
public final Channel ch;
final Packet1Login forgeLogin;
final List<PacketFAPluginMessage> loginMessages;
public Queue<DefinedPacket> packetQueue = new ConcurrentLinkedQueue<>();
@Getter
private final PendingConnection pendingConnection;
@Getter
@Setter(AccessLevel.PACKAGE)
private ServerConnection server;
// reconnect stuff
public int clientEntityId;

View File

@ -9,7 +9,6 @@ import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.event.ChatEvent;
import net.md_5.bungee.api.event.PluginMessageEvent;
import net.md_5.bungee.packet.Packet0KeepAlive;
import net.md_5.bungee.packet.Packet1Login;
import net.md_5.bungee.packet.Packet3Chat;
import net.md_5.bungee.packet.PacketFAPluginMessage;
import net.md_5.bungee.packet.PacketHandler;