Documentation ¶
Overview ¶
Package players implements a goroutine-safe player list.
Index ¶
- type Players
- func (l Players) AddPlayer(p *player.Player)
- func (l Players) BroadcastLogin(to *player.Player)
- func (l Players) BroadcastMessage(msg string)
- func (l Players) BroadcastPacket(pkt packet.Packet)
- func (l Players) Copy() map[string]*player.Player
- func (l Players) GetPlayer(name string) *player.Player
- func (l Players) Len() int
- func (l Players) RemPlayer(p *player.Player)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Players ¶
Players is a simple goroutine-safe player list.
func (Players) BroadcastLogin ¶
BroadcastLogin initializes all previously online clients to a new player.
func (Players) BroadcastMessage ¶
BroadcastMessage send a message to all online players.
func (Players) BroadcastPacket ¶
BroadcastPacket sends a packet to all online players.
Click to show internal directories.
Click to hide internal directories.