mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-29 12:37:40 +01:00
Restore offline mode support for Fabric servers (#3576)
This commit is contained in:
parent
3ecdeacaf8
commit
a5ba53d765
@ -46,6 +46,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.network.ServerLoginNetworkHandler;
|
||||
import net.minecraft.server.network.ServerPlayNetworkHandler;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.Uuids;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@ -69,7 +70,7 @@ public class FabricConnectionListener extends AbstractConnectionListener {
|
||||
|
||||
// Get their profile from the net handler - it should have been initialised by now.
|
||||
GameProfile profile = ((ServerLoginNetworkHandlerAccessor) netHandler).getGameProfile();
|
||||
UUID uniqueId = profile.getId();
|
||||
UUID uniqueId = profile.isComplete() ? profile.getId() : Uuids.getOfflinePlayerUuid(profile.getName());
|
||||
String username = profile.getName();
|
||||
|
||||
if (this.plugin.getConfiguration().get(ConfigKeys.DEBUG_LOGINS)) {
|
||||
|
Loading…
Reference in New Issue
Block a user