minimessage

package module
v0.0.0-...-ee33cb6 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package mini provides utilities for parsing and manipulating Minecraft text colors and styles. It includes functions for parsing strings with embedded style information, modifying styles, and creating gradient effects. It also provides functions for parsing color names and hex codes, and for linear interpolation of colors.

Credits to the partial Go port of MiniMessage (https://docs.advntr.dev/minimessage/index.html) by https://github.com/emortalmc/GateProxy/blob/main/minimessage/minimessage.go. Also creds to https://github.com/minekube/gate-plugin-template/blob/main/util/mini/mini.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(mini string) *c.Text

Parse takes a string as input and returns a `c.Text` object. It splits the input string by "<", then further splits each substring by ">". It modifies the style based on the key (the part before ">") and appends a new text component with the modified style and content (the part after ">").

Types

This section is empty.

Jump to

Keyboard shortcuts

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