mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
Stab at fixing forge and wecui support when combined. F**** I hate mods.
This commit is contained in:
parent
4d51d16512
commit
b5aecd5dcc
@ -77,7 +77,7 @@ public class ServerConnector extends PacketHandler
|
||||
|
||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||
out.writeUTF( "Login" );
|
||||
out.writeUTF( user.getAddress().getAddress().getHostAddress() );
|
||||
out.writeUTF( user.getAddress().getHostString() );
|
||||
out.writeInt( user.getAddress().getPort() );
|
||||
channel.write( new PacketFAPluginMessage( "BungeeCord", out.toByteArray() ) );
|
||||
|
||||
@ -115,6 +115,10 @@ public class ServerConnector extends PacketHandler
|
||||
}
|
||||
}
|
||||
|
||||
for ( PacketFAPluginMessage message : user.getPendingConnection().getRegisterMessages() )
|
||||
{
|
||||
ch.write( message );
|
||||
}
|
||||
if ( !sentMessages )
|
||||
{
|
||||
for ( PacketFAPluginMessage message : user.getPendingConnection().getLoginMessages() )
|
||||
|
@ -63,6 +63,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
private PacketFDEncryptionRequest request;
|
||||
@Getter
|
||||
private List<PacketFAPluginMessage> loginMessages = new ArrayList<>();
|
||||
@Getter
|
||||
private List<PacketFAPluginMessage> registerMessages = new ArrayList<>();
|
||||
private State thisState = State.HANDSHAKE;
|
||||
private SecretKey sharedKey;
|
||||
private final Unsafe unsafe = new Unsafe()
|
||||
@ -95,7 +97,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public void handle(PacketFAPluginMessage pluginMessage) throws Exception
|
||||
{
|
||||
loginMessages.add( pluginMessage );
|
||||
// TODO: Unregister?
|
||||
if ( pluginMessage.getTag().equals( "REGISTER" ) )
|
||||
{
|
||||
registerMessages.add( pluginMessage );
|
||||
} else
|
||||
{
|
||||
loginMessages.add( pluginMessage );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,7 +125,7 @@ public class UpstreamBridge extends PacketHandler
|
||||
// TODO: Unregister as well?
|
||||
if ( pluginMessage.getTag().equals( "REGISTER" ) )
|
||||
{
|
||||
con.getPendingConnection().getLoginMessages().add( pluginMessage );
|
||||
con.getPendingConnection().getRegisterMessages().add( pluginMessage );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user