Discover Packages
github.com/mcstatus-io/mcutil/v3
formatting
package
Version:
v3.6.0
Opens a new window with list of versions in this module.
Published: May 20, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Item is a single formatting item that contains a color and any optional formatting controls
Clean returns the text only of the formatting item
HTML returns the HTML representation of the format item.
A <span> tag is used as well as the style and class attributes.
Obfuscation is encoded as a class with the name 'minecraft-format-obfuscated'.
Raw returns the Minecraft encoding of the formatting (§ + formatting codes/color + text)
type Result struct {
Tree []Item `json:"-"`
Raw string `json:"raw"`
Clean string `json:"clean"`
HTML string `json:"html"`
}
Result is a parsed structure of any Minecraft string encoded with color codes or format codes
Parse parses the formatting of any string or Chat object
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.