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

Method Stop

server/server.go:215–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213}
214
215func (srv *Server) Stop() {
216 log.InfolnClean("Stopping server")
217 srv.closed = true
218 srv.listener.Close()
219 //srv.World.Broadcast.DisconnectAll(text.TextComponent{Text: "Server closed"})
220
221 log.InfolnClean("Saving player data")
222 srv.Players.SaveAll()
223
224 srv.World.Save()
225 log.InfolnfClean("Server lasted for %s", srv.formatTimestart())
226 srv.stopLoop <- struct{}{}
227}
228
229func (srv *Server) formatTimestart() string {
230 sub := time.Since(srv.timeStart)

Callers 3

FreezeMethod · 0.80
StartConsoleFunction · 0.80
StartRawConsoleFunction · 0.80

Calls 6

formatTimestartMethod · 0.95
InfolnCleanFunction · 0.92
InfolnfCleanFunction · 0.92
SaveAllMethod · 0.80
CloseMethod · 0.45
SaveMethod · 0.45

Tested by

no test coverage detected