Documentation ¶
Overview ¶
Package player implements player entities for a minero server.
Index ¶
- func JustLoginMetadata(name string) mct.Metadata
- type Player
- func (p *Player) BroadcastMessage(toList map[string]*Player, message string)
- func (p *Player) Destroy()
- func (p Player) Id() int32
- func (p *Player) OnlineMode(m bool, secret []byte)
- func (p Player) OnlineSince() int64
- func (p Player) RemoteAddr() string
- func (p *Player) SendMessage(message string)
- func (p *Player) SetLook(pitch, yaw float32)
- func (p *Player) SetPitch(pitch float32)
- func (p *Player) SetPos(x, y, z float64)
- func (p *Player) SetReady()
- func (p *Player) SetX(x float64)
- func (p *Player) SetY(y float64)
- func (p *Player) SetYaw(yaw float32)
- func (p *Player) SetZ(z float64)
- func (p Player) String() string
- func (p *Player) Tick(t int64)
- func (p Player) UsesCrypto() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JustLoginMetadata ¶
JustLoginMetadata return default metadata for players who just got in.
Types ¶
type Player ¶
type Player struct { sync.Mutex Conn io.ReadWriter Token []byte Ready bool Name string GameMode int8 X, Y, Z float64 Pitch, Yaw float32 // contains filtered or unexported fields }
func (*Player) BroadcastMessage ¶
BroadcastMessage sends a message to all `ready` players from toList. If p is in that list he/she is ommited.
func (*Player) Destroy ¶
func (p *Player) Destroy()
Destroy attempts to release all resources allocated by this player.
func (*Player) OnlineMode ¶
OnlineMode set's authentication on for p. Authentication is required for online_mode=true servers.
func (Player) OnlineSince ¶
func (Player) RemoteAddr ¶
func (*Player) SendMessage ¶
SendMessage sends a chat message to p.
func (Player) UsesCrypto ¶
Click to show internal directories.
Click to hide internal directories.