minecraft

package
v0.0.0-...-527bd1f Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SESSION_SERVER  = "https://sessionserver.mojang.com"
	PROFILE_URL_FMT = "%s/session/minecraft/profile/%s"
)

Variables

View Source
var (
	ERR_HAS_NO_SKIN = errors.New(`user has no skin`)
)

Functions

func GetSkin

func GetSkin(c *http.Client, pc Profile) (image.Image, error)

Types

type Profile

type Profile struct {
	Id         string
	Name       string
	Properties []ProfileProperty
}

func GetProfile

func GetProfile(c *http.Client, uuid string) (Profile, error)

func (Profile) Textures

func (pc Profile) Textures() (*ProfilePropertyTextures, error)

type ProfileCache

type ProfileCache map[string]ProfileCacheEntry

type ProfileCacheEntry

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

type ProfileClient

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

func NewProfileClient

func NewProfileClient() *ProfileClient

func (*ProfileClient) GetProfile

func (pc *ProfileClient) GetProfile(c *http.Client, uuid string) (Profile, error)

type ProfileProperty

type ProfileProperty struct {
	Name      string
	Value     string
	Signature string
}

type ProfilePropertyTextures

type ProfilePropertyTextures struct {
	Timestamp   uint64
	ProfileId   string
	ProfileName string
	IsPublic    bool
	Textures    map[string]ProfileTextureData
}

type ProfileTextureData

type ProfileTextureData struct {
	Url string
}

Jump to

Keyboard shortcuts

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