Documentation ¶
Index ¶
- type ConnHandler
- type Game
- func (game *Game) BroadcastMessage(msg string)
- func (game *Game) BroadcastPacket(packet proto.IPacket)
- func (game *Game) GetMaxPlayers() int
- func (game *Game) ItemTypeById(id int) (gamerules.ItemType, bool)
- func (game *Game) PlayerByEntityId(id EntityId) gamerules.IPlayerClient
- func (game *Game) PlayerByName(name string) gamerules.IPlayerClient
- func (game *Game) PlayerCount() int
- func (game *Game) Serve()
- type GameInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnHandler ¶
type ConnHandler struct { // UpdateGameInfo is used to reconfigure a running ConnHandler. A Game must // pass something in before this ConnHandler will accept connections. UpdateGameInfo chan *GameInfo // contains filtered or unexported fields }
Handles connections for a game on the given socket.
func NewConnHandler ¶
func NewConnHandler(listener net.Listener, gameInfo *GameInfo) *ConnHandler
NewConnHandler creates and starts a ConnHandler.
func (*ConnHandler) Stop ¶
func (ch *ConnHandler) Stop()
Stop stops the connection handler from accepting any further connections.
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func (*Game) BroadcastMessage ¶
func (*Game) BroadcastPacket ¶
func (*Game) GetMaxPlayers ¶
func (*Game) PlayerByEntityId ¶
func (game *Game) PlayerByEntityId(id EntityId) gamerules.IPlayerClient
func (*Game) PlayerByName ¶
func (game *Game) PlayerByName(name string) gamerules.IPlayerClient
func (*Game) PlayerCount ¶
Directories ¶
Path | Synopsis |
---|---|
Utility functions for reading/writing values to NBT files.
|
Utility functions for reading/writing values to NBT files. |
The window package handles windows for inventories.
|
The window package handles windows for inventories. |
Responsible for reading the overall world persistent state.
|
Responsible for reading the overall world persistent state. |
Click to show internal directories.
Click to hide internal directories.