diff --git a/def.go b/def.go index 254b2d5..1bf02ab 100644 --- a/def.go +++ b/def.go @@ -58,7 +58,7 @@ type PacketAdminJoin struct { func (p *PacketAdminJoin) Bytes() []byte { buf := new(bytes.Buffer) - p.PLength = binary.Size(p) + p.PLength = uint16(binary.Size(p)) _ = binary.Write(buf, binary.LittleEndian, p) return buf.Bytes() }