Documentation
¶
Index ¶
- type ChatComponent
- func (component *ChatComponent) AddExtra(extra IChatComponent)
- func (component *ChatComponent) JSON() (string, error)
- func (component *ChatComponent) SetBold(bold bool)
- func (component *ChatComponent) SetClickEvent(action *ClickAction)
- func (component *ChatComponent) SetColor(color chat.Color)
- func (component *ChatComponent) SetExtra(extra []IChatComponent)
- func (component *ChatComponent) SetHoverEvent(action *HoverAction)
- func (component *ChatComponent) SetInsertion(insertion string)
- func (component *ChatComponent) SetItalic(italic bool)
- func (component *ChatComponent) SetObfuscated(obfuscated bool)
- func (component *ChatComponent) SetStrikeThrough(strikeThrough bool)
- func (component *ChatComponent) SetUnderlined(underlined bool)
- type ClickAction
- type HoverAction
- type IChatComponent
- type StringChatComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatComponent ¶
type ChatComponent struct { Bold bool `json:"bold,omitempty"` Italic bool `json:"italic,omitempty"` Underlined bool `json:"underlined,omitempty"` StrikeThrough bool `json:"strikethrough,omitempty"` Obfuscated bool `json:"obfuscated,omitempty"` Color *string `json:"color,omitempty"` Insertion *string `json:"insertion,omitempty"` ClickEvent *ClickAction `json:"clickEvent,omitempty"` HoverEvent *HoverAction `json:"hoverEvent,omitempty"` Extra []IChatComponent `json:"extra,omitempty"` }
func (*ChatComponent) AddExtra ¶
func (component *ChatComponent) AddExtra(extra IChatComponent)
func (*ChatComponent) JSON ¶
func (component *ChatComponent) JSON() (string, error)
func (*ChatComponent) SetBold ¶
func (component *ChatComponent) SetBold(bold bool)
func (*ChatComponent) SetClickEvent ¶
func (component *ChatComponent) SetClickEvent(action *ClickAction)
func (*ChatComponent) SetColor ¶
func (component *ChatComponent) SetColor(color chat.Color)
func (*ChatComponent) SetExtra ¶
func (component *ChatComponent) SetExtra(extra []IChatComponent)
func (*ChatComponent) SetHoverEvent ¶
func (component *ChatComponent) SetHoverEvent(action *HoverAction)
func (*ChatComponent) SetInsertion ¶
func (component *ChatComponent) SetInsertion(insertion string)
func (*ChatComponent) SetItalic ¶
func (component *ChatComponent) SetItalic(italic bool)
func (*ChatComponent) SetObfuscated ¶
func (component *ChatComponent) SetObfuscated(obfuscated bool)
func (*ChatComponent) SetStrikeThrough ¶
func (component *ChatComponent) SetStrikeThrough(strikeThrough bool)
func (*ChatComponent) SetUnderlined ¶
func (component *ChatComponent) SetUnderlined(underlined bool)
type ClickAction ¶
type ClickAction struct { Action string `json:"action"` Value interface{} `json:"value"` }
func ClickOpenURL ¶
func ClickOpenURL(url string) *ClickAction
func ClickRunCommand ¶
func ClickRunCommand(command string) *ClickAction
func ClickSuggestCommand ¶
func ClickSuggestCommand(command string) *ClickAction
type HoverAction ¶
type HoverAction struct { Action string `json:"action"` Value interface{} `json:"value"` }
func HoverEntity ¶
func HoverEntity(enttiyJson string) *HoverAction
func HoverItem ¶
func HoverItem(itemjson string) *HoverAction
func HoverText ¶
func HoverText(components []IChatComponent) *HoverAction
type IChatComponent ¶
type StringChatComponent ¶
type StringChatComponent struct { Text string `json:"text"` *ChatComponent }
func ChatMessage ¶
func ChatMessage(text string) *StringChatComponent
func (*StringChatComponent) JSON ¶
func (component *StringChatComponent) JSON() (string, error)
func (*StringChatComponent) SetText ¶
func (component *StringChatComponent) SetText(text string)
Click to show internal directories.
Click to hide internal directories.