Duh, of course connect isn't called, because we are already connected!
This commit is contained in:
parent
349949d154
commit
cbb08ec58b
@ -18,22 +18,17 @@ import net.md_5.bungee.packet.PacketCCSettings;
|
||||
import net.md_5.bungee.packet.PacketFAPluginMessage;
|
||||
import net.md_5.bungee.packet.PacketHandler;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class UpstreamBridge extends PacketHandler
|
||||
{
|
||||
|
||||
private final ProxyServer bungee;
|
||||
private final UserConnection con;
|
||||
|
||||
@Override
|
||||
public void exception(Throwable t) throws Exception
|
||||
public UpstreamBridge(ProxyServer bungee, UserConnection con)
|
||||
{
|
||||
con.disconnect( Util.exception( t ) );
|
||||
}
|
||||
this.bungee = bungee;
|
||||
this.con = con;
|
||||
|
||||
@Override
|
||||
public void connected(ChannelWrapper channel) throws Exception
|
||||
{
|
||||
BungeeCord.getInstance().connections.put( con.getName(), con );
|
||||
bungee.getTabListHandler().onConnect( con );
|
||||
con.ch.write( BungeeCord.getInstance().registerChannels() );
|
||||
@ -45,6 +40,12 @@ public class UpstreamBridge extends PacketHandler
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exception(Throwable t) throws Exception
|
||||
{
|
||||
con.disconnect( Util.exception( t ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnected(ChannelWrapper channel) throws Exception
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user