diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java index 754196fb..5c211afc 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java @@ -55,12 +55,15 @@ public void execute(ChannelHandlerContext ctx, Client client) throws Exception { } else { pair = client.auth; } - if(pair == null) - { + if (pair == null) { sendError("ProfileByUUIDResponse: AuthProviderPair is null"); return; } username = pair.handler.uuidToUsername(uuid); + if (username == null) { + sendError(String.format("ProfileByUUIDResponse: User with uuid %s not found or AuthProvider#uuidToUsername returned null", uuid)); + return; + } sendResult(new ProfileByUUIDRequestEvent(getProfile(uuid, username, this.client, client.auth.textureProvider))); } }