cmd

package
v0.0.0-...-bf33021 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GamemodeToString

func GamemodeToString(gm world.GameMode) string

func RegisterAll

func RegisterAll()

RegisterAll registers all commands with the default configurations.

func StringToGamemode

func StringToGamemode(s string) (world.GameMode, bool)

Types

type Gamemode

type Gamemode struct {
	Gamemode GamemodeType
	Player   cmd.Optional[[]cmd.Target]
}

func (Gamemode) Run

func (g Gamemode) Run(src cmd.Source, o *cmd.Output)

type GamemodeType

type GamemodeType string

func (GamemodeType) Options

func (g GamemodeType) Options(source cmd.Source) []string

func (GamemodeType) Type

func (g GamemodeType) Type() string

type Give

type Give struct {
	Player []cmd.Target        `cmd:"player"`
	Item   Item                `cmd:"itemName"`
	Count  cmd.Optional[uint]  `cmd:"amount"`
	Data   cmd.Optional[int16] `cmd:"data"`
}

func (Give) Run

func (g Give) Run(src cmd.Source, o *cmd.Output)

type Item

type Item string

func (Item) Options

func (Item) Options(source cmd.Source) (items []string)

func (Item) Type

func (Item) Type() string

type Kick

type Kick struct {
	Player  []cmd.Target
	Message cmd.Optional[string]
}

func (Kick) Run

func (k Kick) Run(src cmd.Source, o *cmd.Output)

type Kill

type Kill struct {
	Player cmd.Optional[[]cmd.Target]
}

func (Kill) Run

func (k Kill) Run(src cmd.Source, o *cmd.Output)

type SourceCommand

type SourceCommand struct{}

func (SourceCommand) ReducedByArmour

func (s SourceCommand) ReducedByArmour() bool

func (SourceCommand) ReducedByResistance

func (s SourceCommand) ReducedByResistance() bool

type TeleportPlayerToCoords

type TeleportPlayerToCoords struct {
	Player []cmd.Target
	To     mgl64.Vec3
}

func (TeleportPlayerToCoords) Run

func (t TeleportPlayerToCoords) Run(src cmd.Source, o *cmd.Output)

type TeleportPlayerToPlayer

type TeleportPlayerToPlayer struct {
	Player []cmd.Target
	To     []cmd.Target
}

func (TeleportPlayerToPlayer) Run

func (t TeleportPlayerToPlayer) Run(src cmd.Source, o *cmd.Output)

type TeleportToCoords

type TeleportToCoords struct {
	To mgl64.Vec3
}

func (TeleportToCoords) Run

func (t TeleportToCoords) Run(src cmd.Source, o *cmd.Output)

type TeleportToPlayer

type TeleportToPlayer struct {
	To []cmd.Target
}

func (TeleportToPlayer) Run

func (t TeleportToPlayer) Run(src cmd.Source, o *cmd.Output)

type Weather

type Weather struct {
	Weather  WeatherType        `cmd:"weather"`
	Duration cmd.Optional[uint] `cmd:"duration"`
}

func (Weather) Run

func (c Weather) Run(src cmd.Source, o *cmd.Output)

type WeatherType

type WeatherType string

func (WeatherType) Options

func (w WeatherType) Options(source cmd.Source) []string

func (WeatherType) Type

func (w WeatherType) Type() string

Jump to

Keyboard shortcuts

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