playerlist

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 8 Imported by: 4

Documentation

Overview

Package playerlist contains a PlayerList struct that used to manage player information.

The PlayerList contains a list of PlayerInfo which is received from server when client join. The playerlist contains every players' information of name, display name, uuid, gamemode, latency, public key, etc. And can be used to render the "TAB List". Other packages may also require playerlist to work, for example, the bot/msg package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameProfile

type GameProfile struct {
	ID         uuid.UUID
	Name       string
	Properties []user.Property
}

type PlayerInfo

type PlayerInfo struct {
	GameProfile
	ChatSession *sign.Session
	Gamemode    int32
	Latency     int32
	Listed      bool
	DisplayName *chat.Message
}

type PlayerList

type PlayerList struct {
	PlayerInfos map[uuid.UUID]*PlayerInfo
}

func New

func New(c *bot.Client) *PlayerList

Jump to

Keyboard shortcuts

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