cmd

package
v0.0.0-...-911c31e Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowImpl = func(s cmd.Source) bool {
	if t, ok := s.(cmd.NamedTarget); ok {
		return permission.OpEntry().Has(t.Name())
	}
	return false
}

Functions

func Setup

func Setup()

Types

type Ban

type Ban struct {
	Target string
}

func (Ban) Allow

func (b Ban) Allow(s cmd.Source) bool

func (Ban) Run

func (b Ban) Run(src cmd.Source, o *cmd.Output)

type BanList

type BanList struct {
}

func (BanList) Allow

func (b BanList) Allow(s cmd.Source) bool

func (BanList) Run

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

type DeOp

type DeOp struct {
	Target string
}

func (DeOp) Allow

func (DeOp) Allow(s cmd.Source) bool

func (DeOp) Run

func (b DeOp) Run(src cmd.Source, o *cmd.Output)

type DefaultGameMode

type DefaultGameMode struct {
	GameMode string
}

func (DefaultGameMode) Allow

func (d DefaultGameMode) Allow(s cmd.Source) bool

func (DefaultGameMode) Run

func (d DefaultGameMode) Run(src cmd.Source, o *cmd.Output)

type Difficulty

type Difficulty struct {
	Diff string
}

func (Difficulty) Allow

func (d Difficulty) Allow(s cmd.Source) bool

func (Difficulty) Run

func (d Difficulty) Run(src cmd.Source, o *cmd.Output)

type GC

type GC struct{}

func (GC) Allow

func (GC) Allow(s cmd.Source) bool

func (GC) Run

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

type GameMode

type GameMode struct {
	GameMode string
}

func (GameMode) Allow

func (g GameMode) Allow(s cmd.Source) bool

func (GameMode) Run

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

type Help

type Help struct{}

func (Help) Run

func (Help) Run(_ cmd.Source, o *cmd.Output)

type Kick

type Kick struct {
	Target []cmd.Target
	Reason string `optional:""`
}

func (Kick) Allow

func (Kick) Allow(s cmd.Source) bool

func (Kick) Run

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

type List

type List struct{}

func (List) Run

func (List) Run(_ cmd.Source, o *cmd.Output)

type Op

type Op struct {
	Target string
}

func (Op) Allow

func (Op) Allow(s cmd.Source) bool

func (Op) Run

func (b Op) Run(src cmd.Source, o *cmd.Output)

type SetWorldSpawn

type SetWorldSpawn struct{}

func (SetWorldSpawn) Allow

func (SetWorldSpawn) Allow(s cmd.Source) bool

func (SetWorldSpawn) Run

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

type Status

type Status struct{}

func (Status) Allow

func (Status) Allow(s cmd.Source) bool

func (Status) Run

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

type Stop

type Stop struct{}

func (Stop) Allow

func (Stop) Allow(s cmd.Source) bool

func (Stop) Run

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

type Unban

type Unban struct {
	Target string
}

func (Unban) Allow

func (u Unban) Allow(s cmd.Source) bool

func (Unban) Run

func (u Unban) Run(src cmd.Source, o *cmd.Output)

type Version

type Version struct{}

func (Version) Run

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

Jump to

Keyboard shortcuts

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