[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 {
server.authHookManager.checkServerHook.hook(this, pClient);
AuthManager.CheckServerReport report = server.authManager.checkServer(pClient, username, serverID);
if (report != null) {
result.playerProfile = report.playerProfile;
result.uuid = report.uuid;
logger.debug("checkServer: {} uuid: {} serverID: {}", result.playerProfile == null ? null : result.playerProfile.username, result.uuid, serverID);
if(report == null) {
sendError("User not verified");
return;
}
result.playerProfile = report.playerProfile;
result.uuid = report.uuid;
logger.debug("checkServer: {} uuid: {} serverID: {}", result.playerProfile == null ? null : result.playerProfile.username, result.uuid, serverID);
} catch (AuthException | HookException e) {
sendError(e.getMessage());
return;