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

Method writeOrKill

server/player/player.go:94–98  ·  view source on GitHub ↗

writeOrKill tries to write the packet to the player and kills the connection on failure

(pk packet.Encodeable)

Source from the content-addressed store, hash-verified

92
93// writeOrKill tries to write the packet to the player and kills the connection on failure
94func (p *Player) writeOrKill(pk packet.Encodeable) {
95 if err := p.WritePacket(pk); err != nil {
96 p.killConnection(false, "lost connection")
97 }
98}
99
100// finishConfiguration finishes the configuration phase by sending the server brand, registries and tags
101func (p *Player) finishConfiguration() error {

Callers 1

AddPlayerMethod · 0.80

Calls 2

killConnectionMethod · 0.95
WritePacketMethod · 0.80

Tested by

no test coverage detected