Skip to content

Commit

Permalink
Go closer with client behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Jul 26, 2023
1 parent 1b98589 commit 4562b38
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@ public void packetReceived(Session session, Packet packet) {

boolean authSupport = minecraftAccount.isPremiumJava();
if (!authSupport) {
botConnection.logger().info("Server sent a encryption request, but we do not support auth... Sending no response.");
return;
botConnection.logger().info("Server sent a encryption request, but we're offline mode. Not authenticating with mojang.");
}

boolean auth = true;
boolean auth = authSupport;
boolean isLegacy = SWConstants.isLegacy(botSettings.protocolVersion());
if (isLegacy) {
if (auth && isLegacy) {
auth = Objects.requireNonNull(viaUserConnection.get(ProtocolMetadataStorage.class)).authenticate;
}

Expand Down

0 comments on commit 4562b38

Please sign in to comment.