Skip to content

Commit

Permalink
When player provides no UUID, create from username (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
zefir-git authored Aug 15, 2023
2 parents 1b7f769 + 1d7f31c commit 026bd9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ process.on("SIGINT", () => {
});

server.on("packet.LoginPacket", (packet, conn) => {
new LoginSuccessPacket(packet.data.uuid, packet.data.username).send(conn).then();
new LoginSuccessPacket(packet.data.uuid ?? Buffer.from("OfflinePlayer:" + packet.data.username, "utf-8").toString("hex").slice(0, 32), packet.data.username).send(conn).then();
});

0 comments on commit 026bd9e

Please sign in to comment.