nbt

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any

type Any struct {
	Value
	// contains filtered or unexported fields
}

func NewAny

func NewAny(value string) *Any

func (*Any) ToString

func (a *Any) ToString() string

type Compound

type Compound struct {
	// contains filtered or unexported fields
}

func NewCompound

func NewCompound() Compound

func NewErrorString added in v0.2.0

func NewErrorString(value string, fmtParams ...any) Compound

func NewFormattedString added in v0.2.0

func NewFormattedString(value string, format StringFormat, fmtParams ...any) Compound

func (Compound) Get

func (c Compound) Get(key string) (Value, bool)

func (Compound) Set

func (c Compound) Set(key string, value Value) Compound

func (Compound) Size added in v0.0.11

func (c Compound) Size() int

func (Compound) ToString

func (c Compound) ToString() string

type Double

type Double struct {
	Value float64
}

func NewDouble

func NewDouble(value float64) *Double

func (*Double) ToString

func (d *Double) ToString() string

type Int

type Int struct {
	Value
	// contains filtered or unexported fields
}

func NewInt

func NewInt(value int64) *Int

func (*Int) ToString

func (i *Int) ToString() string

type List

type List struct {
	// contains filtered or unexported fields
}

func NewList

func NewList(values ...Value) *List

func (*List) Add added in v0.2.0

func (l *List) Add(value Value)

func (*List) ToString

func (l *List) ToString() string

type String

type String struct {
	Value
	// contains filtered or unexported fields
}

func NewString

func NewString(value string, fmtParams ...any) *String

func (*String) ToString

func (s *String) ToString() string

type StringColor added in v0.2.0

type StringColor string
const (
	Black       StringColor = "black"
	DarkBlue    StringColor = "dark_blue"
	DarkGreen   StringColor = "dark_green"
	DarkAqua    StringColor = "dark_aqua"
	DarkRed     StringColor = "dark_red"
	DarkPurple  StringColor = "dark_purple"
	Gold        StringColor = "gold"
	Gray        StringColor = "gray"
	DarkGray    StringColor = "dark_gray"
	Blue        StringColor = "blue"
	Green       StringColor = "green"
	Aqua        StringColor = "aqua"
	Red         StringColor = "red"
	LightPurple StringColor = "light_purple"
	Yellow      StringColor = "yellow"
	White       StringColor = "white"
)

func HexColor added in v0.2.0

func HexColor(hex string) StringColor

type StringFormat added in v0.2.0

type StringFormat struct {
	Color         StringColor
	Bold          bool
	Italic        bool
	Underlined    bool
	Strikethrough bool
	Obfuscated    bool
}

func (StringFormat) ToMap added in v0.2.0

func (s StringFormat) ToMap() map[string]string

func (StringFormat) ToString added in v0.2.0

func (s StringFormat) ToString() string

type Value

type Value interface {
	ToString() string
}

Jump to

Keyboard shortcuts

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