msgs

package
v0.0.0-...-ca992e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Text  string          `json:"text"`
	Color *chat.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 New

func New(text string) *Message

func (*Message) Add

func (c *Message) Add(text string) *Message

creates and returns a new Chat object, and adds it to the caller's extra slice

func (*Message) AsJson

func (c *Message) AsJson() string

func (*Message) AsText

func (c *Message) AsText() string

func (*Message) Reset

func (c *Message) Reset() *Message

func (*Message) SetBold

func (c *Message) SetBold(value bool) *Message

func (*Message) SetColor

func (c *Message) SetColor(code chat.ChatColor) *Message

func (*Message) SetItalic

func (c *Message) SetItalic(value bool) *Message

func (*Message) SetObfuscated

func (c *Message) SetObfuscated(value bool) *Message

func (*Message) SetStrikethrough

func (c *Message) SetStrikethrough(value bool) *Message

func (*Message) SetUnderlined

func (c *Message) SetUnderlined(value bool) *Message

func (*Message) String

func (c *Message) String() string

type MessagePosition

type MessagePosition byte
const (
	NormalChat MessagePosition = iota
	SystemChat
	HotBarText
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL