public PlayerHandshakeMessage decode(ByteBuf buffer) {
byte protoVersion = buffer.readByte();
String username = VanillaByteBufUtils.readString(buffer);
String hostname = VanillaByteBufUtils.readString(buffer);
int port = buffer.readInt();
return new PlayerHandshakeMessage(protoVersion, username, hostname, port);
}