server

package
v0.0.0-...-ed75f63 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	Identifier string

	OnLoad func(*Plugin)
	Unload func(*Plugin)
	// contains filtered or unexported fields
}

func (Plugin) Dir

func (p Plugin) Dir() string

Dir returns the base directory for the plugin (plugins/<identifier>)

func (Plugin) FS

func (p Plugin) FS() fs.FS

func (Plugin) Server

func (p Plugin) Server() *Server

type Server

type Server struct {
	TickManager *tick.TickManager

	World *world.World

	CommandManager *command.Manager

	Players *state.PlayerEntityManager
	// contains filtered or unexported fields
}

func New

func New(cfg properties.ServerProperties, world *world.World) (*Server, error)

Creates a new server instance using the specified config, returns an error if unable to bind listener

func (*Server) Listener

func (srv *Server) Listener() *net.Listener

func (*Server) Properties

func (srv *Server) Properties() properties.ServerProperties

func (*Server) SetStatusProvider

func (srv *Server) SetStatusProvider(sp net.StatusProvider)

func (*Server) Start

func (srv *Server) Start(ts time.Time)

func (*Server) Stop

func (srv *Server) Stop()

Directories

Path Synopsis
Package command provides utilities for handling and registering commands
Package command provides utilities for handling and registering commands
chunk
Package chunk provides a way of encoding and modifying chunks
Package chunk provides a way of encoding and modifying chunks
chunk/section
Package section provides methods of modifying chunk sections
Package section provides methods of modifying chunk sections
level/seed
Package seed provides parsing of string seeds and generating them
Package seed provides parsing of string seeds and generating them

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳