Use case-sensitive name from the event joining player

Related #1219
This commit is contained in:
games647
2024-07-05 14:45:20 +02:00
parent 29100b5376
commit bdd7af8290
2 changed files with 2 additions and 2 deletions

View File

@ -119,8 +119,8 @@ public class ProtocolLibListener extends PacketAdapter {
if (packetType == START) {
if (plugin.getFloodgateService() != null) {
boolean success = processFloodgateTasks(packetEvent);
// don't continue execution if the player was kicked by Floodgate
if (!success) {
// don't continue execution if the player was kicked by Floodgate
return;
}
}

View File

@ -117,7 +117,7 @@ public class ConnectListener {
StoredProfile playerProfile = session.getProfile();
playerProfile.setId(verifiedUUID);
if (!plugin.getCore().getConfig().get("premiumUuid", true)) {
UUID offlineUUID = UUIDAdapter.generateOfflineId(playerProfile.getName());
UUID offlineUUID = UUIDAdapter.generateOfflineId(event.getUsername());
event.setGameProfile(event.getGameProfile().withId(offlineUUID));
plugin.getLog().info("Overridden UUID from {} to {} (based of {}) on {}",
verifiedUUID, offlineUUID, verifiedUsername, event.getConnection());