mc-beta-server/server/Packets/Packet2Handshake.js
2021-08-20 22:42:00 +01:00

19 lines
No EOL
321 B
JavaScript

const Packet = require("./Packet.js");
class Packet2Handshake extends Packet {
constructor(username = "") {
super(0x02);
this.username = username;
}
writePacket() {
super.writePacket();
this.writer.writeString("-"); // "-" == Offline mode
return this.toBuffer();
}
}
module.exports = Packet2Handshake;