Documentation
¶
Overview ¶
Package golem provides a typed Minecraft Java RCON client.
Index ¶
- type AddWhitelistUserInput
- type AddWhitelistUserResult
- type BanEntry
- type BanIPInput
- type BanIPResult
- type BanListType
- type BanPlayerInput
- type BanPlayerResult
- type BroadcastMessageInput
- type BroadcastMessageResult
- type Client
- func (c *Client) AddWhitelistUser(ctx context.Context, input AddWhitelistUserInput) (*Response[AddWhitelistUserResult], error)
- func (c *Client) BanIP(ctx context.Context, input BanIPInput) (*Response[BanIPResult], error)
- func (c *Client) BanPlayer(ctx context.Context, input BanPlayerInput) (*Response[BanPlayerResult], error)
- func (c *Client) BroadcastMessage(ctx context.Context, input BroadcastMessageInput) (*Response[BroadcastMessageResult], error)
- func (c *Client) DeopPlayer(ctx context.Context, input DeopPlayerInput) (*Response[DeopPlayerResult], error)
- func (c *Client) DisableAutoSave(ctx context.Context) (*Response[DisableAutoSaveResult], error)
- func (c *Client) DisableWhitelist(ctx context.Context) (*Response[DisableWhitelistResult], error)
- func (c *Client) EnableAutoSave(ctx context.Context) (*Response[EnableAutoSaveResult], error)
- func (c *Client) EnableWhitelist(ctx context.Context) (*Response[EnableWhitelistResult], error)
- func (c *Client) GetBooleanGameRule(ctx context.Context, input GetBooleanGameRuleInput) (*Response[GetBooleanGameRuleResult], error)
- func (c *Client) GetDifficulty(ctx context.Context) (*Response[GetDifficultyResult], error)
- func (c *Client) GetGameRule(ctx context.Context, input GetGameRuleInput) (*Response[GetGameRuleResult], error)
- func (c *Client) GetIntegerGameRule(ctx context.Context, input GetIntegerGameRuleInput) (*Response[GetIntegerGameRuleResult], error)
- func (c *Client) GetSeed(ctx context.Context) (*Response[GetSeedResult], error)
- func (c *Client) GetTime(ctx context.Context, input GetTimeInput) (*Response[GetTimeResult], error)
- func (c *Client) GetVersion(ctx context.Context) (*Response[GetVersionResult], error)
- func (c *Client) KickPlayer(ctx context.Context, input KickPlayerInput) (*Response[KickPlayerResult], error)
- func (c *Client) ListBans(ctx context.Context, input ListBansInput) (*Response[ListBansResult], error)
- func (c *Client) ListUsers(ctx context.Context) (*Response[ListUsersResult], error)
- func (c *Client) ListWhitelistUsers(ctx context.Context) (*Response[ListWhitelistUsersResult], error)
- func (c *Client) OpPlayer(ctx context.Context, input OpPlayerInput) (*Response[OpPlayerResult], error)
- func (c *Client) PardonIP(ctx context.Context, input PardonIPInput) (*Response[PardonIPResult], error)
- func (c *Client) PardonPlayer(ctx context.Context, input PardonPlayerInput) (*Response[PardonPlayerResult], error)
- func (c *Client) ReloadData(ctx context.Context) (*Response[ReloadDataResult], error)
- func (c *Client) ReloadWhitelist(ctx context.Context) (*Response[ReloadWhitelistResult], error)
- func (c *Client) RemoveWhitelistUser(ctx context.Context, input RemoveWhitelistUserInput) (*Response[RemoveWhitelistUserResult], error)
- func (c *Client) SaveAll(ctx context.Context) (*Response[SaveAllResult], error)
- func (c *Client) SetBooleanGameRule(ctx context.Context, input SetBooleanGameRuleInput) (*Response[SetBooleanGameRuleResult], error)
- func (c *Client) SetDefaultGameMode(ctx context.Context, input SetDefaultGameModeInput) (*Response[SetDefaultGameModeResult], error)
- func (c *Client) SetDifficulty(ctx context.Context, input SetDifficultyInput) (*Response[SetDifficultyResult], error)
- func (c *Client) SetGameRule(ctx context.Context, input SetGameRuleInput) (*Response[SetGameRuleResult], error)
- func (c *Client) SetIdleTimeout(ctx context.Context, input SetIdleTimeoutInput) (*Response[SetIdleTimeoutResult], error)
- func (c *Client) SetIntegerGameRule(ctx context.Context, input SetIntegerGameRuleInput) (*Response[SetIntegerGameRuleResult], error)
- func (c *Client) SetTime(ctx context.Context, input SetTimeInput) (*Response[SetTimeResult], error)
- func (c *Client) SetWeather(ctx context.Context, input SetWeatherInput) (*Response[SetWeatherResult], error)
- func (c *Client) SetWorldSpawn(ctx context.Context, input SetWorldSpawnInput) (*Response[SetWorldSpawnResult], error)
- func (c *Client) StopServer(ctx context.Context) (*Response[StopServerResult], error)
- type CommandError
- type DeopPlayerInput
- type DeopPlayerResult
- type Difficulty
- type DisableAutoSaveResult
- type DisableWhitelistResult
- type EnableAutoSaveResult
- type EnableWhitelistResult
- type Executor
- type GameMode
- type GetBooleanGameRuleInput
- type GetBooleanGameRuleResult
- type GetDifficultyResult
- type GetGameRuleInput
- type GetGameRuleResult
- type GetIntegerGameRuleInput
- type GetIntegerGameRuleResult
- type GetSeedResult
- type GetTimeInput
- type GetTimeResult
- type GetVersionResult
- type KickPlayerInput
- type KickPlayerResult
- type ListBansInput
- type ListBansResult
- type ListUsersResult
- type ListWhitelistUsersResult
- type MinecraftClient
- type OpPlayerInput
- type OpPlayerResult
- type PardonIPInput
- type PardonIPResult
- type PardonPlayerInput
- type PardonPlayerResult
- type ParseError
- type Position
- type ReloadDataResult
- type ReloadWhitelistResult
- type RemoveWhitelistUserInput
- type RemoveWhitelistUserResult
- type Response
- type SaveAllResult
- type SetBooleanGameRuleInput
- type SetBooleanGameRuleResult
- type SetDefaultGameModeInput
- type SetDefaultGameModeResult
- type SetDifficultyInput
- type SetDifficultyResult
- type SetGameRuleInput
- type SetGameRuleResult
- type SetIdleTimeoutInput
- type SetIdleTimeoutResult
- type SetIntegerGameRuleInput
- type SetIntegerGameRuleResult
- type SetTimeInput
- type SetTimeResult
- type SetWeatherInput
- type SetWeatherResult
- type SetWorldSpawnInput
- type SetWorldSpawnResult
- type StopServerResult
- type TimePreset
- type TimeQueryMode
- type TimeValue
- type ValidationError
- type Weather
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddWhitelistUserInput ¶
type AddWhitelistUserInput struct {
Player string
}
AddWhitelistUserInput adds a player to the whitelist.
type AddWhitelistUserResult ¶
type AddWhitelistUserResult struct {
Player string
}
AddWhitelistUserResult reports the added player.
type BanIPInput ¶
BanIPInput bans an IP address, optionally with a reason.
type BanIPResult ¶
type BanIPResult struct {
Address string
}
BanIPResult reports the banned IP address.
type BanListType ¶
type BanListType string
BanListType represents a filter for the ban list.
const ( BanListTypeIPs BanListType = "ips" BanListTypePlayers BanListType = "players" )
type BanPlayerInput ¶
BanPlayerInput bans a player, optionally with a reason.
type BanPlayerResult ¶
type BanPlayerResult struct {
Player string
}
BanPlayerResult reports the banned player.
type BroadcastMessageInput ¶
type BroadcastMessageInput struct {
Message string
}
BroadcastMessageInput broadcasts a chat message.
type BroadcastMessageResult ¶
type BroadcastMessageResult struct {
Message string
}
BroadcastMessageResult reports the broadcast message.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements MinecraftClient on top of an RCON executor.
func NewClientWithExecutor ¶
NewClientWithExecutor returns a Client backed by a custom executor.
func (*Client) AddWhitelistUser ¶
func (c *Client) AddWhitelistUser( ctx context.Context, input AddWhitelistUserInput, ) (*Response[AddWhitelistUserResult], error)
AddWhitelistUser adds a player to the whitelist.
func (*Client) BanIP ¶
func (c *Client) BanIP(ctx context.Context, input BanIPInput) (*Response[BanIPResult], error)
BanIP bans an IP address.
func (*Client) BanPlayer ¶
func (c *Client) BanPlayer(ctx context.Context, input BanPlayerInput) (*Response[BanPlayerResult], error)
BanPlayer bans a player.
func (*Client) BroadcastMessage ¶
func (c *Client) BroadcastMessage( ctx context.Context, input BroadcastMessageInput, ) (*Response[BroadcastMessageResult], error)
BroadcastMessage broadcasts a message to the server.
func (*Client) DeopPlayer ¶
func (c *Client) DeopPlayer(ctx context.Context, input DeopPlayerInput) (*Response[DeopPlayerResult], error)
DeopPlayer removes operator status from a player.
func (*Client) DisableAutoSave ¶
DisableAutoSave disables automatic world saves.
func (*Client) DisableWhitelist ¶
DisableWhitelist disables the whitelist.
func (*Client) EnableAutoSave ¶
EnableAutoSave enables automatic world saves.
func (*Client) EnableWhitelist ¶
EnableWhitelist enables the whitelist.
func (*Client) GetBooleanGameRule ¶
func (c *Client) GetBooleanGameRule( ctx context.Context, input GetBooleanGameRuleInput, ) (*Response[GetBooleanGameRuleResult], error)
GetBooleanGameRule returns the current value of a boolean game rule.
func (*Client) GetDifficulty ¶
GetDifficulty returns the current difficulty.
func (*Client) GetGameRule ¶
func (c *Client) GetGameRule(ctx context.Context, input GetGameRuleInput) (*Response[GetGameRuleResult], error)
GetGameRule returns the current value of a game rule.
func (*Client) GetIntegerGameRule ¶
func (c *Client) GetIntegerGameRule( ctx context.Context, input GetIntegerGameRuleInput, ) (*Response[GetIntegerGameRuleResult], error)
GetIntegerGameRule returns the current value of an integer game rule.
func (*Client) GetTime ¶
func (c *Client) GetTime(ctx context.Context, input GetTimeInput) (*Response[GetTimeResult], error)
GetTime returns a selected time counter.
func (*Client) GetVersion ¶
GetVersion returns the server version string.
func (*Client) KickPlayer ¶
func (c *Client) KickPlayer(ctx context.Context, input KickPlayerInput) (*Response[KickPlayerResult], error)
KickPlayer kicks a player.
func (*Client) ListBans ¶
func (c *Client) ListBans(ctx context.Context, input ListBansInput) (*Response[ListBansResult], error)
ListBans returns bans for the selected filter.
func (*Client) ListWhitelistUsers ¶
func (c *Client) ListWhitelistUsers(ctx context.Context) (*Response[ListWhitelistUsersResult], error)
ListWhitelistUsers returns whitelisted players.
func (*Client) OpPlayer ¶
func (c *Client) OpPlayer(ctx context.Context, input OpPlayerInput) (*Response[OpPlayerResult], error)
OpPlayer grants operator status to a player.
func (*Client) PardonIP ¶
func (c *Client) PardonIP(ctx context.Context, input PardonIPInput) (*Response[PardonIPResult], error)
PardonIP removes an IP ban.
func (*Client) PardonPlayer ¶
func (c *Client) PardonPlayer(ctx context.Context, input PardonPlayerInput) (*Response[PardonPlayerResult], error)
PardonPlayer removes a player ban.
func (*Client) ReloadData ¶
ReloadData reloads data packs, loot tables, and functions from disk.
func (*Client) ReloadWhitelist ¶
ReloadWhitelist reloads the whitelist from disk.
func (*Client) RemoveWhitelistUser ¶
func (c *Client) RemoveWhitelistUser( ctx context.Context, input RemoveWhitelistUserInput, ) (*Response[RemoveWhitelistUserResult], error)
RemoveWhitelistUser removes a player from the whitelist.
func (*Client) SetBooleanGameRule ¶
func (c *Client) SetBooleanGameRule( ctx context.Context, input SetBooleanGameRuleInput, ) (*Response[SetBooleanGameRuleResult], error)
SetBooleanGameRule sets a boolean game rule value.
func (*Client) SetDefaultGameMode ¶
func (c *Client) SetDefaultGameMode( ctx context.Context, input SetDefaultGameModeInput, ) (*Response[SetDefaultGameModeResult], error)
SetDefaultGameMode sets the default game mode.
func (*Client) SetDifficulty ¶
func (c *Client) SetDifficulty( ctx context.Context, input SetDifficultyInput, ) (*Response[SetDifficultyResult], error)
SetDifficulty sets the current difficulty.
func (*Client) SetGameRule ¶
func (c *Client) SetGameRule(ctx context.Context, input SetGameRuleInput) (*Response[SetGameRuleResult], error)
SetGameRule sets a game rule value.
func (*Client) SetIdleTimeout ¶
func (c *Client) SetIdleTimeout( ctx context.Context, input SetIdleTimeoutInput, ) (*Response[SetIdleTimeoutResult], error)
SetIdleTimeout sets the idle timeout in minutes.
func (*Client) SetIntegerGameRule ¶
func (c *Client) SetIntegerGameRule( ctx context.Context, input SetIntegerGameRuleInput, ) (*Response[SetIntegerGameRuleResult], error)
SetIntegerGameRule sets an integer game rule value.
func (*Client) SetTime ¶
func (c *Client) SetTime(ctx context.Context, input SetTimeInput) (*Response[SetTimeResult], error)
SetTime sets the current time.
func (*Client) SetWeather ¶
func (c *Client) SetWeather(ctx context.Context, input SetWeatherInput) (*Response[SetWeatherResult], error)
SetWeather sets the current weather.
func (*Client) SetWorldSpawn ¶
func (c *Client) SetWorldSpawn(ctx context.Context, input SetWorldSpawnInput) (*Response[SetWorldSpawnResult], error)
SetWorldSpawn sets the world spawn position.
func (*Client) StopServer ¶
StopServer stops the server.
type CommandError ¶
CommandError reports that the server rejected an otherwise well-formed command.
func (CommandError) Error ¶
func (e CommandError) Error() string
Error implements the error interface.
type DeopPlayerInput ¶
type DeopPlayerInput struct {
Player string
}
DeopPlayerInput removes operator status from a player.
type DeopPlayerResult ¶
type DeopPlayerResult struct {
Player string
}
DeopPlayerResult reports the affected player.
type Difficulty ¶
type Difficulty string
Difficulty represents a Minecraft difficulty value.
const ( DifficultyEasy Difficulty = "easy" DifficultyHard Difficulty = "hard" DifficultyNormal Difficulty = "normal" DifficultyPeaceful Difficulty = "peaceful" )
type DisableAutoSaveResult ¶
type DisableAutoSaveResult struct{}
DisableAutoSaveResult reports automatic save disable completion.
type DisableWhitelistResult ¶
type DisableWhitelistResult struct{}
DisableWhitelistResult reports whitelist disable completion.
type EnableAutoSaveResult ¶
type EnableAutoSaveResult struct{}
EnableAutoSaveResult reports automatic save enable completion.
type EnableWhitelistResult ¶
type EnableWhitelistResult struct{}
EnableWhitelistResult reports whitelist enable completion.
type GetBooleanGameRuleInput ¶
type GetBooleanGameRuleInput struct {
Name string
}
GetBooleanGameRuleInput queries a boolean game rule.
type GetBooleanGameRuleResult ¶
GetBooleanGameRuleResult contains a queried boolean game rule value.
type GetDifficultyResult ¶
type GetDifficultyResult struct {
Difficulty Difficulty
}
GetDifficultyResult contains the current difficulty.
type GetGameRuleInput ¶
type GetGameRuleInput struct {
Name string
}
GetGameRuleInput queries a game rule.
type GetGameRuleResult ¶
GetGameRuleResult contains the queried game rule value.
type GetIntegerGameRuleInput ¶
type GetIntegerGameRuleInput struct {
Name string
}
GetIntegerGameRuleInput queries an integer game rule.
type GetIntegerGameRuleResult ¶
GetIntegerGameRuleResult contains a queried integer game rule value.
type GetSeedResult ¶
type GetSeedResult struct {
Seed int64
}
GetSeedResult contains the current world seed.
type GetTimeInput ¶
type GetTimeInput struct {
Mode TimeQueryMode
}
GetTimeInput selects the queried time counter.
type GetTimeResult ¶
type GetTimeResult struct {
Mode TimeQueryMode
Value int
}
GetTimeResult contains the queried time value.
type GetVersionResult ¶
type GetVersionResult struct {
Version string
}
GetVersionResult contains the server version string.
type KickPlayerInput ¶
KickPlayerInput kicks a player, optionally with a reason.
type KickPlayerResult ¶
type KickPlayerResult struct {
Player string
}
KickPlayerResult reports the kicked player.
type ListBansInput ¶
type ListBansInput struct {
Type BanListType
}
ListBansInput filters the listed ban entries.
type ListBansResult ¶
type ListBansResult struct {
Details []BanEntry
Entries []string
Type BanListType
}
ListBansResult contains ban entries for a selected filter.
type ListUsersResult ¶
ListUsersResult contains currently connected players.
type ListWhitelistUsersResult ¶
ListWhitelistUsersResult contains whitelisted players.
type MinecraftClient ¶
type MinecraftClient interface {
AddWhitelistUser(ctx context.Context, input AddWhitelistUserInput) (*Response[AddWhitelistUserResult], error)
BanIP(ctx context.Context, input BanIPInput) (*Response[BanIPResult], error)
BanPlayer(ctx context.Context, input BanPlayerInput) (*Response[BanPlayerResult], error)
BroadcastMessage(
ctx context.Context,
input BroadcastMessageInput,
) (*Response[BroadcastMessageResult], error)
DeopPlayer(ctx context.Context, input DeopPlayerInput) (*Response[DeopPlayerResult], error)
DisableAutoSave(ctx context.Context) (*Response[DisableAutoSaveResult], error)
DisableWhitelist(ctx context.Context) (*Response[DisableWhitelistResult], error)
EnableAutoSave(ctx context.Context) (*Response[EnableAutoSaveResult], error)
EnableWhitelist(ctx context.Context) (*Response[EnableWhitelistResult], error)
GetBooleanGameRule(
ctx context.Context,
input GetBooleanGameRuleInput,
) (*Response[GetBooleanGameRuleResult], error)
GetDifficulty(ctx context.Context) (*Response[GetDifficultyResult], error)
GetGameRule(ctx context.Context, input GetGameRuleInput) (*Response[GetGameRuleResult], error)
GetIntegerGameRule(
ctx context.Context,
input GetIntegerGameRuleInput,
) (*Response[GetIntegerGameRuleResult], error)
GetSeed(ctx context.Context) (*Response[GetSeedResult], error)
GetTime(ctx context.Context, input GetTimeInput) (*Response[GetTimeResult], error)
GetVersion(ctx context.Context) (*Response[GetVersionResult], error)
KickPlayer(ctx context.Context, input KickPlayerInput) (*Response[KickPlayerResult], error)
ListBans(ctx context.Context, input ListBansInput) (*Response[ListBansResult], error)
ListUsers(ctx context.Context) (*Response[ListUsersResult], error)
ListWhitelistUsers(ctx context.Context) (*Response[ListWhitelistUsersResult], error)
OpPlayer(ctx context.Context, input OpPlayerInput) (*Response[OpPlayerResult], error)
PardonIP(ctx context.Context, input PardonIPInput) (*Response[PardonIPResult], error)
PardonPlayer(ctx context.Context, input PardonPlayerInput) (*Response[PardonPlayerResult], error)
ReloadData(ctx context.Context) (*Response[ReloadDataResult], error)
ReloadWhitelist(ctx context.Context) (*Response[ReloadWhitelistResult], error)
RemoveWhitelistUser(
ctx context.Context,
input RemoveWhitelistUserInput,
) (*Response[RemoveWhitelistUserResult], error)
SaveAll(ctx context.Context) (*Response[SaveAllResult], error)
SetBooleanGameRule(
ctx context.Context,
input SetBooleanGameRuleInput,
) (*Response[SetBooleanGameRuleResult], error)
SetGameRule(ctx context.Context, input SetGameRuleInput) (*Response[SetGameRuleResult], error)
SetDefaultGameMode(
ctx context.Context,
input SetDefaultGameModeInput,
) (*Response[SetDefaultGameModeResult], error)
SetDifficulty(
ctx context.Context,
input SetDifficultyInput,
) (*Response[SetDifficultyResult], error)
SetIdleTimeout(
ctx context.Context,
input SetIdleTimeoutInput,
) (*Response[SetIdleTimeoutResult], error)
SetIntegerGameRule(
ctx context.Context,
input SetIntegerGameRuleInput,
) (*Response[SetIntegerGameRuleResult], error)
SetTime(ctx context.Context, input SetTimeInput) (*Response[SetTimeResult], error)
SetWeather(ctx context.Context, input SetWeatherInput) (*Response[SetWeatherResult], error)
SetWorldSpawn(ctx context.Context, input SetWorldSpawnInput) (*Response[SetWorldSpawnResult], error)
StopServer(ctx context.Context) (*Response[StopServerResult], error)
}
MinecraftClient defines the stable v1 Minecraft command surface.
type OpPlayerInput ¶
type OpPlayerInput struct {
Player string
}
OpPlayerInput grants operator status to a player.
type OpPlayerResult ¶
type OpPlayerResult struct {
Player string
}
OpPlayerResult reports the affected player.
type PardonIPResult ¶
type PardonIPResult struct {
Address string
}
PardonIPResult reports the unbanned IP address.
type PardonPlayerInput ¶
type PardonPlayerInput struct {
Player string
}
PardonPlayerInput removes a player ban.
type PardonPlayerResult ¶
type PardonPlayerResult struct {
Player string
}
PardonPlayerResult reports the affected player.
type ParseError ¶
ParseError reports that a command response could not be parsed.
type ReloadDataResult ¶
type ReloadDataResult struct{}
ReloadDataResult reports data reload completion.
type ReloadWhitelistResult ¶
type ReloadWhitelistResult struct{}
ReloadWhitelistResult reports whitelist reload completion.
type RemoveWhitelistUserInput ¶
type RemoveWhitelistUserInput struct {
Player string
}
RemoveWhitelistUserInput removes a player from the whitelist.
type RemoveWhitelistUserResult ¶
type RemoveWhitelistUserResult struct {
Player string
}
RemoveWhitelistUserResult reports the removed player.
type SetBooleanGameRuleInput ¶
SetBooleanGameRuleInput sets a boolean game rule value.
type SetBooleanGameRuleResult ¶
SetBooleanGameRuleResult reports the applied boolean game rule value.
type SetDefaultGameModeInput ¶
type SetDefaultGameModeInput struct {
Mode GameMode
}
SetDefaultGameModeInput sets the default game mode.
type SetDefaultGameModeResult ¶
type SetDefaultGameModeResult struct {
Mode GameMode
}
SetDefaultGameModeResult reports the applied default game mode.
type SetDifficultyInput ¶
type SetDifficultyInput struct {
Difficulty Difficulty
}
SetDifficultyInput sets the current difficulty.
type SetDifficultyResult ¶
type SetDifficultyResult struct {
Difficulty Difficulty
}
SetDifficultyResult reports the applied difficulty.
type SetGameRuleInput ¶
SetGameRuleInput sets a game rule value.
type SetGameRuleResult ¶
SetGameRuleResult reports the applied game rule value.
type SetIdleTimeoutInput ¶
type SetIdleTimeoutInput struct {
Minutes int
}
SetIdleTimeoutInput sets the idle timeout in minutes.
type SetIdleTimeoutResult ¶
type SetIdleTimeoutResult struct {
Minutes int
}
SetIdleTimeoutResult reports the applied idle timeout.
type SetIntegerGameRuleInput ¶
SetIntegerGameRuleInput sets an integer game rule value.
type SetIntegerGameRuleResult ¶
SetIntegerGameRuleResult reports the applied integer game rule value.
type SetTimeInput ¶
type SetTimeInput struct {
Value TimeValue
}
SetTimeInput sets the current time.
type SetTimeResult ¶
type SetTimeResult struct {
Value string
}
SetTimeResult reports the applied time value.
type SetWeatherInput ¶
SetWeatherInput sets the current weather.
type SetWeatherResult ¶
SetWeatherResult reports the applied weather.
type SetWorldSpawnInput ¶
SetWorldSpawnInput sets the world spawn position.
type SetWorldSpawnResult ¶
SetWorldSpawnResult reports the applied world spawn position.
type StopServerResult ¶
type StopServerResult struct{}
StopServerResult reports stop command submission.
type TimePreset ¶
type TimePreset string
TimePreset represents a supported /time set preset.
const ( TimePresetDay TimePreset = "day" TimePresetMidnight TimePreset = "midnight" TimePresetNight TimePreset = "night" TimePresetNoon TimePreset = "noon" )
type TimeQueryMode ¶
type TimeQueryMode string
TimeQueryMode represents a supported /time query mode.
const ( TimeQueryModeDay TimeQueryMode = "day" TimeQueryModeDaytime TimeQueryMode = "daytime" TimeQueryModeTime TimeQueryMode = "time" TimeQueryModeGametime TimeQueryMode = "gametime" )
type TimeValue ¶
type TimeValue struct {
// contains filtered or unexported fields
}
TimeValue represents a typed /time set value.
func NewTimePresetValue ¶
func NewTimePresetValue(preset TimePreset) TimeValue
NewTimePresetValue returns a preset-backed time value.
func NewTimeTickValue ¶
NewTimeTickValue returns a tick-backed time value.
type ValidationError ¶
ValidationError reports invalid user input before command execution.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Error implements the error interface.