mc-webserver/pageHandler/pages/index/mc.go

37 lines
817 B
Go
Raw Normal View History

2023-08-13 20:19:47 +01:00
package index
import (
"html/template"
"time"
2023-08-13 20:19:47 +01:00
)
type MC struct {
Timestamp time.Time
2023-08-13 20:19:47 +01:00
Version *string
ProtocolVersion *int64
Address string
Port uint16
Port6 *uint16
PlayerCount *int64
MaxPlayers *int64
Players []string
MOTD string
ActualHost *string
ActualPort *uint16
2023-08-14 17:36:14 +01:00
Favicon *string
2023-08-13 20:19:47 +01:00
Edition *string
ModCount int64
Mods []string
SecureProfilesEnforced *bool
PreviewChatEnforced *bool
}
2023-08-14 17:36:14 +01:00
func (m MC) GetFaviconSRC() template.HTMLAttr {
toReturn := "src=\""
if m.Favicon != nil {
toReturn += *m.Favicon
}
toReturn += "\""
return template.HTMLAttr(toReturn)
}