[FIX] Correct error in checkServer

This commit is contained in:
Gravita 2021-10-15 21:05:26 +07:00
parent 2171fb291f
commit b5aeac3ff2

View file

@ -31,11 +31,13 @@ public void execute(ChannelHandlerContext ctx, Client pClient) {
try { try {
server.authHookManager.checkServerHook.hook(this, pClient); server.authHookManager.checkServerHook.hook(this, pClient);
AuthManager.CheckServerReport report = server.authManager.checkServer(pClient, username, serverID); AuthManager.CheckServerReport report = server.authManager.checkServer(pClient, username, serverID);
if (report != null) { if(report == null) {
sendError("User not verified");
return;
}
result.playerProfile = report.playerProfile; result.playerProfile = report.playerProfile;
result.uuid = report.uuid; result.uuid = report.uuid;
logger.debug("checkServer: {} uuid: {} serverID: {}", result.playerProfile == null ? null : result.playerProfile.username, result.uuid, serverID); logger.debug("checkServer: {} uuid: {} serverID: {}", result.playerProfile == null ? null : result.playerProfile.username, result.uuid, serverID);
}
} catch (AuthException | HookException e) { } catch (AuthException | HookException e) {
sendError(e.getMessage()); sendError(e.getMessage());
return; return;