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

37 lines
1.7 KiB
Go
Raw Normal View History

2023-08-13 20:19:47 +01:00
package index
import (
"html/template"
2023-08-14 17:36:14 +01:00
"strings"
2023-08-13 20:19:47 +01:00
"time"
)
type DataYaml struct {
PageTitle string `yaml:"pageTitle"`
ServerDescription template.HTML `yaml:"serverDescription"`
2023-08-14 17:36:14 +01:00
Footer string `yaml:"footer"`
2023-08-13 20:19:47 +01:00
MCAddress string `yaml:"mcAddress"`
MCPort uint16 `yaml:"mcPort"`
MCType string `yaml:"mcType"`
MCProtocolVersion int `yaml:"mcProtocolVersion"`
MCClientGUID int64 `yaml:"mcClientGUID"`
MCTimeout time.Duration `yaml:"mcTimeout"`
2023-08-13 21:21:18 +01:00
MCQueryInterval time.Duration `yaml:"mcQueryInterval"`
2023-08-13 20:19:47 +01:00
AllowDisplayState bool `yaml:"allowDisplayState"`
AllowDisplayVersion bool `yaml:"allowDisplayVersion"`
AllowDisplayActualAddress bool `yaml:"allowDisplayActualAddress"`
AllowPlayerCountDisplay bool `yaml:"allowPlayerCountDisplay"`
AllowPlayerListing bool `yaml:"allowPlayerListing"`
AllowMOTDDisplay bool `yaml:"allowMOTDDisplay"`
AllowFaviconDisplay bool `yaml:"allowFaviconDisplay"`
AllowSecureProfileModeDisplay bool `yaml:"allowSecureProfileModeDisplay"`
AllowPreviewChatModeDisplay bool `yaml:"allowPreviewChatModeDisplay"`
AllowDisplayModded bool `yaml:"allowDisplayModded"`
AllowModListing bool `yaml:"allowModListing"`
ShowAnonymousPlayers bool `yaml:"showAnonymousPlayers"`
2023-08-13 20:19:47 +01:00
}
2023-08-14 17:36:14 +01:00
func (dy DataYaml) GetCleanMCType() string {
return strings.Title(dy.MCType)
}