skywars

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 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 Config

type Config struct {
	ID                   string `yaml:"id"`
	MinPlayers           int    `yaml:"min_players"`
	MaxPlayers           int    `yaml:"max_players"`
	CountdownSeconds     int    `yaml:"countdown_seconds"`
	GameDurationSeconds  int    `yaml:"game_duration_seconds"`
	GracePeriodSeconds   int    `yaml:"grace_period_seconds"`
	InvincibilitySeconds int    `yaml:"invincibility_seconds"`
	AutoRefillChests     bool   `yaml:"auto_refill_chests"`
	RefillInterval       int    `yaml:"refill_interval_seconds"`
	DropLootOnDeath      bool   `yaml:"drop_loot_on_death"`
}

func DefaultConfig

func DefaultConfig() *Config

type Match

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

func NewMatch

func NewMatch(id string, arena framework.Arena, players []*player.Player, config *Config, fw *framework.Framework) *Match

func (*Match) AddPlayer

func (m *Match) AddPlayer(p *player.Player) error

func (*Match) Alive

func (m *Match) Alive() []*player.Player

func (*Match) Done

func (m *Match) Done() <-chan struct{}

func (*Match) GameID

func (m *Match) GameID() string

func (*Match) ID

func (m *Match) ID() string

func (*Match) Players

func (m *Match) Players() []*player.Player

func (*Match) Start

func (m *Match) Start()

func (*Match) State

func (m *Match) State() framework.MatchState

type SkyWars

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

func New

func New(fw *framework.Framework) *SkyWars

func (*SkyWars) ChestFiller

func (s *SkyWars) ChestFiller(chestType framework.ChestType) []map[string]int

func (*SkyWars) Config

func (s *SkyWars) Config() *Config

func (*SkyWars) CreateMatch

func (s *SkyWars) CreateMatch(id string, arena framework.Arena, players []*player.Player) framework.Match

func (*SkyWars) Description

func (s *SkyWars) Description() string

func (*SkyWars) ID

func (s *SkyWars) ID() string

func (*SkyWars) LoadConfig

func (s *SkyWars) LoadConfig(data []byte) error

func (*SkyWars) MaxPlayers

func (s *SkyWars) MaxPlayers() int

func (*SkyWars) MinPlayers

func (s *SkyWars) MinPlayers() int

func (*SkyWars) Name

func (s *SkyWars) Name() string

Jump to

Keyboard shortcuts

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