chunkymonkey

package
v0.0.0-...-93088af Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2013 License: MIT Imports: 17 Imported by: 0

Documentation

Index

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 NewGame

func NewGame(worldPath string, listener net.Listener, serverDesc, maintenanceMsg string, maxPlayerCount int) (game *Game, err error)

func (*Game) BroadcastMessage

func (game *Game) BroadcastMessage(msg string)

func (*Game) BroadcastPacket

func (game *Game) BroadcastPacket(packet proto.IPacket)

func (*Game) GetMaxPlayers

func (game *Game) GetMaxPlayers() int

func (*Game) ItemTypeById

func (game *Game) ItemTypeById(id int) (gamerules.ItemType, bool)

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

func (game *Game) PlayerCount() int

func (*Game) Serve

func (game *Game) Serve()

Fetch external events and respond appropriately.

type GameInfo

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

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.

Jump to

Keyboard shortcuts

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