MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / Encode

Method Encode

protocol/net/packet/login/plugin.go:53–66  ·  view source on GitHub ↗
(w encoding.Writer)

Source from the content-addressed store, hash-verified

51}
52
53func (l *LoginPluginResponse) Encode(w encoding.Writer) error {
54 if err := w.VarInt(l.MessageID); err != nil {
55 return err
56 }
57 if err := w.Bool(l.Sucessful); err != nil {
58 return err
59 }
60 if l.Sucessful {
61 if err := w.FixedByteArray(l.Data); err != nil {
62 return err
63 }
64 }
65 return nil
66}
67
68func (l *LoginPluginResponse) Decode(r encoding.Reader) error {
69 if _, err := r.VarInt(&l.MessageID); err != nil {

Callers

nothing calls this directly

Calls 3

VarIntMethod · 0.45
BoolMethod · 0.45
FixedByteArrayMethod · 0.45

Tested by

no test coverage detected