From 4ac087e391c48d34f3b5f87c38b4566cd18a82d0 Mon Sep 17 00:00:00 2001 From: MiGoYAm Date: Sat, 11 Dec 2021 17:48:45 +0100 Subject: [PATCH] Revert "optimize" This reverts commit 0dda88d649ee14095587696f1400d6bdabc18964. --- .../java/ru/nanit/limbo/connection/ClientConnection.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/nanit/limbo/connection/ClientConnection.java b/src/main/java/ru/nanit/limbo/connection/ClientConnection.java index d2339aa8..b4041c6e 100644 --- a/src/main/java/ru/nanit/limbo/connection/ClientConnection.java +++ b/src/main/java/ru/nanit/limbo/connection/ClientConnection.java @@ -353,10 +353,11 @@ private boolean checkVelocityKeyIntegrity(ByteMessage buf) { } public static void initPackets(LimboServer server) { - final UUID uuid = UuidUtil.getOfflineModeUuid(""); + final String username = server.getConfig().getPingData().getVersion(); + final UUID uuid = UuidUtil.getOfflineModeUuid(username); PacketLoginSuccess loginSuccess = new PacketLoginSuccess(); - loginSuccess.setUsername(""); + loginSuccess.setUsername(username); loginSuccess.setUuid(uuid); PacketJoinGame joinGame = new PacketJoinGame(); @@ -389,7 +390,7 @@ public static void initPackets(LimboServer server) { positionAndLook.setTeleportId(ThreadLocalRandom.current().nextInt()); PacketPlayerInfo info = new PacketPlayerInfo(); - info.setUsername(""); + info.setUsername(username); info.setGameMode(server.getConfig().getGameMode()); info.setUuid(uuid);