player

package
v0.0.0-...-abfa450 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPlayer

type IPlayer interface {
	entity.LivingEntity
	Username() string
	Profile() *profile.PlayerProfile
	ClientSettings() clientsettings.ClientSettings
	Position() world.Position
	SendMessage(msg component.IChatComponent)
	SendActionbar(msg component.IChatComponent)
	Disconnect(msg component.IChatComponent)
	WritePacket(packet protocol.PacketOut) error
	KnownChunks() map[chunk.ChunkKey]bool
	Team() *team.Team
	SetTeam(team *team.Team)
	OpenInventory(inventory inventory.Inventory)
	PlayerInventory() *playerinventory.PlayerInventory
	UpdateInventory()
	SetTablistHeader(header component.IChatComponent)
	SetTablistFooter(footer component.IChatComponent)
	SetTablistHeaderFooter(header component.IChatComponent, footer component.IChatComponent)
	SendTitle(title component.IChatComponent, subtitle component.IChatComponent, fadein int32, stay int32, fadeout int32)
	PlaySound(Location world.BlockPosition, Sound types.SoundEffect, volume float32, pitch float32)
	FoodLevel() int
	SetFoodLevel(foodLevel int)
	Saturation() float32
	SetSaturation(saturation float32)
	Gamemode() types.Gamemode
	SetGamemode(gamemode types.Gamemode)
	GetMetadata() metadata.MetadataMap
	SetSneaking(sneaking bool)
	IsSneaking() bool
	SetBlocking(blocking bool)
	IsBlocking() bool
}

type PlayerRegistry

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

func NewPlayerRegistry

func NewPlayerRegistry() *PlayerRegistry

func (*PlayerRegistry) GetPlayerFromEID

func (r *PlayerRegistry) GetPlayerFromEID(eid int32) *connplayer.ConnectedPlayer

func (*PlayerRegistry) GetPlayerFromUUID

func (r *PlayerRegistry) GetPlayerFromUUID(uuid uuid.UUID) *connplayer.ConnectedPlayer

func (*PlayerRegistry) GetPlayers

func (r *PlayerRegistry) GetPlayers() []*connplayer.ConnectedPlayer

func (*PlayerRegistry) RegisterPlayer

func (r *PlayerRegistry) RegisterPlayer(p *connplayer.ConnectedPlayer) bool

func (*PlayerRegistry) UnregisterPlayer

func (r *PlayerRegistry) UnregisterPlayer(p *connplayer.ConnectedPlayer) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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