Skip to content

Commit

Permalink
remove sync stuff change EncoderProtocol to DecoderProtocol
Browse files Browse the repository at this point in the history
  • Loading branch information
Outfluencer committed Dec 1, 2024
1 parent acddc22 commit 529a7b2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
6 changes: 2 additions & 4 deletions proxy/src/main/java/net/md_5/bungee/ServerConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,17 @@ private void cutThrough(ServerConnection server)
return;
}

if ( user.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_20_2 && !user.getConfiguring().get() )
if ( user.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_20_2 )
{
if ( user.getServer() != null )
{
// Begin config mode
if ( user.getCh().getEncodeProtocol() != Protocol.CONFIGURATION )
if ( user.getCh().getDecodeProtocol() != Protocol.CONFIGURATION )
{
user.getConfiguring().set( true );
user.unsafe().sendPacket( new StartConfiguration() );
}
} else
{
user.getConfiguring().set( true );
LoginResult loginProfile = user.getPendingConnection().getLoginProfile();
user.unsafe().sendPacket( new LoginSuccess( user.getRewriteId(), user.getName(), ( loginProfile == null ) ? null : loginProfile.getProperties() ) );
user.getCh().setEncodeProtocol( Protocol.CONFIGURATION );
Expand Down
2 changes: 0 additions & 2 deletions proxy/src/main/java/net/md_5/bungee/UserConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ public final class UserConnection implements ProxiedPlayer
@Getter
@Setter
private String lastCommandTabbed;
@Getter
private final AtomicBoolean configuring = new AtomicBoolean( false );
/*========================================================================*/
@Getter
private String displayName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ public void handle(StartConfiguration startConfiguration) throws Exception

private void configureServer()
{
con.getConfiguring().set( true );
ChannelWrapper ch = con.getServer().getCh();
if ( ch.getDecodeProtocol() == Protocol.LOGIN )
{
Expand All @@ -371,7 +370,6 @@ private void configureServer()
@Override
public void handle(FinishConfiguration finishConfiguration) throws Exception
{
con.getConfiguring().set( false );
con.sendQueuedPackets();
}

Expand Down

0 comments on commit 529a7b2

Please sign in to comment.