Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionState ¶
type ConnectionState int32
ConnectionState is the state of a Minecraft connection
const ( HandshakeState ConnectionState = 0x00 // Handshake StatusState ConnectionState = 0x01 // Status LoginState ConnectionState = 0x02 // Login PlayState ConnectionState = 0x03 // Play )
func (ConnectionState) String ¶
func (i ConnectionState) String() string
type Identifier ¶
Identifier is a Minecraft resource identifier
func NewIdentifier ¶
func NewIdentifier(namespace string, path string) Identifier
func NewIdentifierFromString ¶
func NewIdentifierFromString(resourceName string) Identifier
func (Identifier) String ¶
func (i Identifier) String() string
type Mode ¶
type Mode enc.UnsignedByte
Mode is a Minecraft gamemode
type ServerDescription ¶
type ServerDescription TextComponent
ServerDescription can be both a string (legacy) or TextComponent JSON structure
func (*ServerDescription) UnmarshalJSON ¶
func (c *ServerDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON implementation for ServerDescription which accepts both a TextComponent or a string (legacy format)
type ServerInfo ¶
type ServerInfo struct { Version ServerInfoVersion `json:"version"` // Server version info Players ServerInfoPlayers `json:"players"` // Server player info Description ServerDescription `json:"description"` // Server description Favicon string `json:"favicon,omitempty"` // Server favicon }
ServerInfo is the JSON datastructure returned by the Server List Ping response https://wiki.vg/Server_List_Ping#Response
type ServerInfoPlayer ¶
type ServerInfoPlayers ¶
type ServerInfoPlayers struct { Max int32 `json:"max"` // Max amount of players allowed Online int32 `json:"online"` // Amount of players online Sample []ServerInfoPlayer `json:"sample"` // Sample of online players }
type ServerInfoVersion ¶
type TextComponent ¶
type TextComponent struct { Text string `json:"text"` // Text content Bold *bool `json:"bold,omitempty"` // Component is emboldened Italic *bool `json:"italic,omitempty"` // Component is italicized Underlined *bool `json:"underlined,omitempty"` // Component is underlined Strikethrough *bool `json:"strikethrough,omitempty"` // Component is struck out Obfuscated *bool `json:"obfuscated,omitempty"` // Component randomly switches between characters of the same width Color string `json:"color,omitempty"` // Contains the color for the component Extra []TextComponent `json:"extra,omitempty"` // TextComponent siblings }
TextComponent is the JSON format used for most text data in Minecraft See: https://wiki.vg/Chat#Current_system_.28JSON_Chat.29
Click to show internal directories.
Click to hide internal directories.