Documentation
¶
Index ¶
- Variables
- func Commands() map[string]Command
- func Register(command Command)
- func Unregister(name string)
- type Allower
- type Command
- func (cmd Command) Aliases() []string
- func (cmd Command) Description() string
- func (cmd Command) Execute(args string, source Source, tx *world.Tx)
- func (cmd Command) Name() string
- func (cmd Command) Params(src Source) [][]ParamInfo
- func (cmd Command) Runnables(src Source) map[int]Runnable
- func (cmd Command) String() string
- func (cmd Command) Usage() string
- type Enum
- type Line
- type MobNameEnum
- type NamedTarget
- type Optional
- type Output
- func (o *Output) Error(a ...any)
- func (o *Output) ErrorCount() int
- func (o *Output) Errorf(format string, a ...any)
- func (o *Output) Errors() []error
- func (o *Output) Errort(t chat.Translation, a ...any)
- func (o *Output) MessageCount() int
- func (o *Output) Messages() []fmt.Stringer
- func (o *Output) Print(a ...any)
- func (o *Output) Printf(format string, a ...any)
- func (o *Output) Printt(t chat.Translation, a ...any)
- type ParamDescriber
- type ParamInfo
- type Parameter
- type Runnable
- type Source
- type SubCommand
- type Summon
- type Target
- type Varargs
Constants ¶
This section is empty.
Variables ¶
View Source
var MessageBooleanInvalid = chat.Translate(str("%commands.generic.boolean.invalid"), 1, `'%v' is not true or false`).Enc("<red>> %v</red>")
View Source
var MessageNoTargets = chat.Translate(str("%commands.generic.noTargetMatch"), 0, `No targets matched selector`).Enc("<red>%v</red>")
View Source
var MessageNumberInvalid = chat.Translate(str("%commands.generic.num.invalid"), 1, `'%v' is not a valid number`).Enc("<red>> %v</red>")
View Source
var MessageParameterInvalid = chat.Translate(str("%commands.generic.parameter.invalid"), 1, `'%v' is not a valid parameter`).Enc("<red>> %v</red>")
View Source
var MessagePlayerNotFound = chat.Translate(str("%commands.generic.player.notFound"), 0, `That player cannot be found`).Enc("<red>> %v</red>")
View Source
var MessageSyntax = chat.Translate(str("%commands.generic.syntax"), 3, `Syntax error: unexpected value: at "%v>>%v<<%v"`).Enc("<red>%v</red>")
View Source
var MessageUnknown = chat.Translate(str("%commands.generic.unknown"), 1, `Unknown command: "%v": Please check that the command exists and that you have permission to use it.`).Enc("<red>%v</red>")
View Source
var MessageUsage = chat.Translate(str("%commands.generic.usage"), 1, `Usage: %v`).Enc("<red>%v</red>")
Functions ¶
func Unregister ¶
func Unregister(name string)
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (Command) Description ¶
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
func (*Line) RemoveNext ¶
func (line *Line) RemoveNext()
func (*Line) SyntaxError ¶
func (*Line) UsageError ¶
type MobNameEnum ¶
type MobNameEnum string
func (MobNameEnum) Options ¶
func (MobNameEnum) Options(Source) []string
func (MobNameEnum) Type ¶
func (MobNameEnum) Type() string
type NamedTarget ¶
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
func (*Output) ErrorCount ¶
func (*Output) MessageCount ¶
type ParamDescriber ¶
type SubCommand ¶
type SubCommand struct{}
type Summon ¶
type Summon struct {
Mob MobNameEnum
}
Click to show internal directories.
Click to hide internal directories.