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

Method SaveAll

server/player/state/playerEntityManager.go:31–39  ·  view source on GitHub ↗

saves all the players in the manager to the path specified in their data file

()

Source from the content-addressed store, hash-verified

29
30// saves all the players in the manager to the path specified in their data file
31func (mgr *PlayerEntityManager) SaveAll() {
32 mgr.mu.RLock()
33 defer mgr.mu.RUnlock()
34 for _, player := range mgr.m {
35 player.sync()
36
37 player.data.Save()
38 }
39}
40
41func NewPlayerEntityManager() *PlayerEntityManager {
42 return &PlayerEntityManager{m: make(map[uuid.UUID]*PlayerEntity)}

Callers 1

StopMethod · 0.80

Calls 2

syncMethod · 0.80
SaveMethod · 0.45

Tested by

no test coverage detected