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

Method provideStatus

server/server.go:120–141  ·  view source on GitHub ↗
(*net.Conn)

Source from the content-addressed store, hash-verified

118}
119
120func (srv *Server) provideStatus(*net.Conn) status.StatusResponseData {
121 //count := srv.World.Broadcast.NumSession()
122 count := 0
123 max := srv.cfg.MaxPlayers
124 if max == -1 {
125 max = count + 1
126 }
127 return status.StatusResponseData{
128 Version: status.StatusVersion{
129 Name: "Zeppelin 1.21.3",
130 Protocol: net.ProtocolVersion,
131 },
132 Description: text.Unmarshal(srv.cfg.MOTD, srv.cfg.ChatFormatter.Rune()),
133 Players: status.StatusPlayers{
134 Max: max,
135 Online: count,
136 //Sample: srv.World.Broadcast.Sample(),
137 },
138 Favicon: srv.icon,
139 EnforcesSecureChat: srv.cfg.EnforceSecureProfile,
140 }
141}
142
143func (srv *Server) SetStatusProvider(sp net.StatusProvider) {
144 srv.listener.SetStatusProvider(sp)

Callers

nothing calls this directly

Calls 2

UnmarshalFunction · 0.92
RuneMethod · 0.80

Tested by

no test coverage detected