Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandler ¶
func RegisterHandler(state, id int32, handler func(*Player, packet.Decodeable) error) struct{}
Types ¶
type Player ¶
type Player struct { *net.Conn *state.PlayerEntity Unlisted bool ClientInformation atomic.Pointer[configuration.ClientInformation] // contains filtered or unexported fields }
func (*Player) SynchronizePosition ¶
SynchronizePosition teleports the player to the specified coordinates
func (*Player) SystemMessage ¶
func (p *Player) SystemMessage(msg text.TextComponent) error
SystemMessage sends a system message (unsigned) to the player
func (*Player) ViewDistance ¶
ViewDistance returns the view distance of the client, in chunks, or the server's render distance if the client's view distance is bigger or not set
type PlayerList ¶
type PlayerList struct {
// contains filtered or unexported fields
}
func NewPlayerList ¶
func NewPlayerList(cap uintptr) PlayerList
func (*PlayerList) AddPlayer ¶
func (list *PlayerList) AddPlayer(player *Player)
func (*PlayerList) New ¶
func (list *PlayerList) New(conn *net.Conn, en *state.PlayerEntity, dimensionManager *dimension.DimensionManager, worldLevel *level.Level, serverProperties *properties.ServerProperties, commandManager *command.Manager) *Player
func (*PlayerList) NumPlayers ¶
func (list *PlayerList) NumPlayers() int
func (*PlayerList) PlayerByUsername ¶
func (list *PlayerList) PlayerByUsername(name string) *Player
Source Files
¶
Click to show internal directories.
Click to hide internal directories.