toPacket

Turns the player info object into a wrapped packet. This is necessary because the encoder itself is only triggered in Netty, and it is possible that the buffer has already been replaced with a new variant before it gets to that stage.

Return

thread-safe player info packet class, wrapping the pre-built buffer.

Throws

if there was an exception during the computation of player info for this specific playerinfo object,