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();
|
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||||
out.writeUTF( "Login" );
|
out.writeUTF( "Login" );
|
||||||
out.writeUTF( user.getAddress().getAddress().getHostAddress() );
|
out.writeUTF( user.getAddress().getHostString() );
|
||||||
out.writeInt( user.getAddress().getPort() );
|
out.writeInt( user.getAddress().getPort() );
|
||||||
channel.write( new PacketFAPluginMessage( "BungeeCord", out.toByteArray() ) );
|
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 )
|
if ( !sentMessages )
|
||||||
{
|
{
|
||||||
for ( PacketFAPluginMessage message : user.getPendingConnection().getLoginMessages() )
|
for ( PacketFAPluginMessage message : user.getPendingConnection().getLoginMessages() )
|
||||||
|
@ -63,6 +63,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
private PacketFDEncryptionRequest request;
|
private PacketFDEncryptionRequest request;
|
||||||
@Getter
|
@Getter
|
||||||
private List<PacketFAPluginMessage> loginMessages = new ArrayList<>();
|
private List<PacketFAPluginMessage> loginMessages = new ArrayList<>();
|
||||||
|
@Getter
|
||||||
|
private List<PacketFAPluginMessage> registerMessages = new ArrayList<>();
|
||||||
private State thisState = State.HANDSHAKE;
|
private State thisState = State.HANDSHAKE;
|
||||||
private SecretKey sharedKey;
|
private SecretKey sharedKey;
|
||||||
private final Unsafe unsafe = new Unsafe()
|
private final Unsafe unsafe = new Unsafe()
|
||||||
@ -94,9 +96,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(PacketFAPluginMessage pluginMessage) throws Exception
|
public void handle(PacketFAPluginMessage pluginMessage) throws Exception
|
||||||
|
{
|
||||||
|
// TODO: Unregister?
|
||||||
|
if ( pluginMessage.getTag().equals( "REGISTER" ) )
|
||||||
|
{
|
||||||
|
registerMessages.add( pluginMessage );
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
loginMessages.add( pluginMessage );
|
loginMessages.add( pluginMessage );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(PacketFEPing ping) throws Exception
|
public void handle(PacketFEPing ping) throws Exception
|
||||||
|
@ -125,7 +125,7 @@ public class UpstreamBridge extends PacketHandler
|
|||||||
// TODO: Unregister as well?
|
// TODO: Unregister as well?
|
||||||
if ( pluginMessage.getTag().equals( "REGISTER" ) )
|
if ( pluginMessage.getTag().equals( "REGISTER" ) )
|
||||||
{
|
{
|
||||||
con.getPendingConnection().getLoginMessages().add( pluginMessage );
|
con.getPendingConnection().getRegisterMessages().add( pluginMessage );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user