Documentation
¶
Index ¶
- Variables
- type Chat
- func (chat *Chat) Close() error
- func (chat *Chat) Subscribe(s Subscriber)
- func (chat *Chat) Subscribed(s Subscriber) bool
- func (chat *Chat) Unsubscribe(s Subscriber)
- func (chat *Chat) Write(p []byte) (n int, err error)
- func (chat *Chat) WriteString(s string) (n int, err error)
- func (chat *Chat) Writet(t Translation, a ...any)
- type StdoutSubscriber
- type Subscriber
- type Translation
- type TranslationString
- type Translator
Constants ¶
This section is empty.
Variables ¶
View Source
var Global = New()
View Source
var MessageBedIsOccupied = Translate(str("%tile.bed.occupied"), 0, `This bed is occupied`).Enc("<grey>%v</grey>")
View Source
var MessageBedNotValid = Translate(str("%tile.bed.notValid"), 0, `Your home bed was missing or obstructed`)
View Source
var MessageBedObstructed = Translate(str("%tile.bed.obstructed"), 0, `Bed is obstructed`).Enc("<grey>%v</grey>")
View Source
var MessageBedTooFar = Translate(str("%tile.bed.tooFar"), 0, `Bed is too far away`).Enc("<grey>%v</grey>")
View Source
var MessageJoin = Translate(str("%multiplayer.player.joined"), 1, `%v joined the game`).Enc("<yellow>%v</yellow>")
View Source
var MessageNoSleep = Translate(str("%tile.bed.noSleep"), 0, `You can only sleep at night and during thunderstorms`).Enc("<grey>%v</grey>")
View Source
var MessageQuit = Translate(str("%multiplayer.player.left"), 1, `%v left the game`).Enc("<yellow>%v</yellow>")
View Source
var MessageRespawnPointSet = Translate(str("%tile.bed.respawnSet"), 0, `Respawn point set`).Enc("<grey>%v</grey>")
View Source
var MessageServerDisconnect = Translate(str("%disconnect.disconnected"), 0, `Disconnected by Server`).Enc("<yellow>%v</yellow>")
View Source
var MessageSleeping = Translate(str("%chat.type.sleeping"), 2, `%v is sleeping in a bed. To skip to dawn, %v more users need to sleep in beds at the same time.`)
Functions ¶
This section is empty.
Types ¶
type Chat ¶
type Chat struct {
// contains filtered or unexported fields
}
func (*Chat) Subscribe ¶
func (chat *Chat) Subscribe(s Subscriber)
func (*Chat) Subscribed ¶
func (chat *Chat) Subscribed(s Subscriber) bool
func (*Chat) Unsubscribe ¶
func (chat *Chat) Unsubscribe(s Subscriber)
func (*Chat) Writet ¶
func (chat *Chat) Writet(t Translation, a ...any)
type StdoutSubscriber ¶
type StdoutSubscriber struct{}
func (StdoutSubscriber) Message ¶
func (c StdoutSubscriber) Message(a ...any)
func (StdoutSubscriber) UUID ¶
func (c StdoutSubscriber) UUID() uuid.UUID
type Subscriber ¶
type Translation ¶
type Translation struct {
// contains filtered or unexported fields
}
func Translate ¶
func Translate(str TranslationString, params int, fallback string) Translation
func (Translation) Enc ¶
func (t Translation) Enc(format string) Translation
func (Translation) F ¶
func (t Translation) F(a ...any) translation
func (Translation) Zero ¶
func (t Translation) Zero() bool
type TranslationString ¶
type Translator ¶
type Translator interface {
Messaget(t Translation, a ...any)
}
Click to show internal directories.
Click to hide internal directories.