Skip to content

Commit

Permalink
Revert "optimize"
Browse files Browse the repository at this point in the history
This reverts commit 0dda88d.
  • Loading branch information
MiGoYAm committed Dec 11, 2021
1 parent f23ee89 commit 4ac087e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/ru/nanit/limbo/connection/ClientConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 4ac087e

Please sign in to comment.