Documentation
¶
Index ¶
- Constants
- func Translate(text string) string
- func TranslateConsole(text string) string
- type ChatColor
- type ColorCode
- type Message
- func (c *Message) Add(text string) *Message
- func (c *Message) AsJson() string
- func (c *Message) AsText() string
- func (c *Message) Reset() *Message
- func (c *Message) SetBold(value bool) *Message
- func (c *Message) SetColor(code ChatColor) *Message
- func (c *Message) SetItalic(value bool) *Message
- func (c *Message) SetObfuscated(value bool) *Message
- func (c *Message) SetStrikethrough(value bool) *Message
- func (c *Message) SetUnderlined(value bool) *Message
- func (c *Message) String() string
- type MessagePosition
Constants ¶
View Source
const ColorAChar = '&'
View Source
const ColorCChar = '§'
Variables ¶
This section is empty.
Functions ¶
func TranslateConsole ¶
Types ¶
type ChatColor ¶
type ChatColor int
func (*ChatColor) MarshalJSON ¶
func (*ChatColor) UnmarshalJSON ¶
type Message ¶
type Message struct {
Text string `json:"text"`
Color *ChatColor `json:"color,string,omitempty"`
Bold *bool `json:"bold,boolean,omitempty"`
Italic *bool `json:"italic,boolean,omitempty"`
Underlined *bool `json:"underlined,boolean,omitempty"`
Strikethrough *bool `json:"strikethrough,boolean,omitempty"`
Obfuscated *bool `json:"obfuscated,boolean,omitempty"`
Extra []*Message `json:"extra,omitempty"`
// contains filtered or unexported fields
}
func (*Message) Add ¶
creates and returns a new Chat object, and adds it to the caller's extra slice
func (*Message) SetObfuscated ¶
func (*Message) SetStrikethrough ¶
func (*Message) SetUnderlined ¶
type MessagePosition ¶
type MessagePosition byte
const ( NormalChat MessagePosition = iota SystemChat HotBarText )
Click to show internal directories.
Click to hide internal directories.