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

Struct Player

server/player/player.go:22–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20)
21
22type Player struct {
23 *net.Conn
24 *state.PlayerEntity
25
26 playerList *PlayerList
27 // the entity id for this player
28 entityId int32
29
30 Unlisted bool
31
32 ClientInformation atomic.Pointer[configuration.ClientInformation]
33
34 dimensionManager *dimension.DimensionManager
35 worldLevel *level.Level
36
37 serverProperties *properties.ServerProperties
38 commandManager *command.Manager
39
40 // the time in milliseconds that the keep alive packet was sent to the server from the client
41 sbLastKeepalive atomic.Int64
42 // the time in milliseconds that the keep alive packet was sent to the client from the server
43 cbLastKeepAlive atomic.Int64
44
45 registryIndexes map[string][]string
46
47 // the packet currently awaited
48 packetAwaited atomic.Int32
49 packetAwaitedChan atomic.Pointer[chan packet.Decodeable]
50}
51
52func int32toAtomic(i int32) atomic.Int32 {
53 // int32 and atomic.Int32 are the same structure and size

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected