mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Debug verified username usage in ProtocolLib
This commit is contained in:
@ -101,20 +101,21 @@ public class VerifyResponseTask implements Runnable {
|
|||||||
InetAddress address = socketAddress.getAddress();
|
InetAddress address = socketAddress.getAddress();
|
||||||
Optional<Verification> response = resolver.hasJoined(requestedUsername, serverId, address);
|
Optional<Verification> response = resolver.hasJoined(requestedUsername, serverId, address);
|
||||||
if (response.isPresent()) {
|
if (response.isPresent()) {
|
||||||
plugin.getLog().info("GameProfile {} has a verified premium account", requestedUsername);
|
Verification verification = response.get();
|
||||||
String realUsername = response.get().getName();
|
plugin.getLog().info("Profile {} has a verified premium account: {}", requestedUsername, verification);
|
||||||
|
String realUsername = verification.getName();
|
||||||
if (realUsername == null) {
|
if (realUsername == null) {
|
||||||
disconnect("invalid-session", true, "Username field null for {}", requestedUsername);
|
disconnect("invalid-session", true, "Username field null for {}", requestedUsername);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkinProperty[] properties = response.get().getProperties();
|
SkinProperty[] properties = verification.getProperties();
|
||||||
if (properties.length > 0) {
|
if (properties.length > 0) {
|
||||||
session.setSkinProperty(properties[0]);
|
session.setSkinProperty(properties[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
session.setVerifiedUsername(realUsername);
|
session.setVerifiedUsername(realUsername);
|
||||||
session.setUuid(response.get().getId());
|
session.setUuid(verification.getId());
|
||||||
session.setVerified(true);
|
session.setVerified(true);
|
||||||
|
|
||||||
setPremiumUUID(session.getUuid());
|
setPremiumUUID(session.getUuid());
|
||||||
|
Reference in New Issue
Block a user