Documentation
¶
Index ¶
- func RegisterAll(s *session.Manager)
- type AllyAction
- type Base
- type FactionAlly
- type FactionBorder
- type FactionClaim
- type FactionCreate
- type FactionDelete
- type FactionInfoOther
- type FactionInfoSelf
- type FactionInvite
- type FactionJoin
- type FactionLeave
- type FactionTop
- type FactionUnclaim
- type SubCommand
- type TopType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAll ¶
Types ¶
type AllyAction ¶
type AllyAction string
AllyAction is an Enum for alliance actions.
func (AllyAction) Type ¶
func (AllyAction) Type() string
type Base ¶
type Base struct {
Name string
Description string
Aliases []string
SubCommands map[string]SubCommand
SessionManager *session.Manager
}
Base is a base command that can hold multiple subcommands.
type FactionAlly ¶
type FactionAlly struct {
Ally cmd.SubCommand `cmd:"ally"`
Action AllyAction `cmd:"action"`
TargetFaction string `cmd:"faction"`
// contains filtered or unexported fields
}
FactionAlly defines the structure for the /f ally <action> <faction> commands.
type FactionBorder ¶
type FactionBorder struct {
Border cmd.SubCommand `cmd:"border"`
// contains filtered or unexported fields
}
FactionBorder defines the structure for the /f border command.
type FactionClaim ¶
type FactionClaim struct {
Claim cmd.SubCommand `cmd:"claim"`
// contains filtered or unexported fields
}
FactionClaim defines the structure for the /f claim command.
type FactionCreate ¶
type FactionCreate struct {
Create cmd.SubCommand `cmd:"create"`
FactionName string `cmd:"name"`
// contains filtered or unexported fields
}
FactionCreate defines the structure for the /f create <name> command.
type FactionDelete ¶
type FactionDelete struct {
Delete cmd.SubCommand `cmd:"delete"`
FactionName string `cmd:"name"`
// contains filtered or unexported fields
}
FactionDelete defines the structure for the /f delete <name> command.
type FactionInfoOther ¶
type FactionInfoOther struct {
Info cmd.SubCommand `cmd:"info"`
FactionName string `cmd:"name"`
// contains filtered or unexported fields
}
FactionInfoOther defines the structure for the /f info <name> command.
type FactionInfoSelf ¶
type FactionInfoSelf struct {
Info cmd.SubCommand `cmd:"info"`
// contains filtered or unexported fields
}
FactionInfoSelf defines the structure for the /f info command (no arguments).
type FactionInvite ¶
type FactionInvite struct {
Invite cmd.SubCommand `cmd:"invite"`
Target []cmd.Target `cmd:"player"`
// contains filtered or unexported fields
}
FactionInvite defines the structure for the /f invite <player> command.
type FactionJoin ¶
type FactionJoin struct {
Join cmd.SubCommand `cmd:"join"`
FactionName string `cmd:"faction"`
// contains filtered or unexported fields
}
FactionJoin defines the structure for the /f join <faction> command.
type FactionLeave ¶
type FactionLeave struct {
Leave cmd.SubCommand `cmd:"leave"`
// contains filtered or unexported fields
}
FactionLeave defines the structure for the /f leave command.
type FactionTop ¶
type FactionTop struct {
Top cmd.SubCommand `cmd:"top"`
Category TopType `cmd:"category"`
// contains filtered or unexported fields
}
FactionTop defines the structure for the /f top <player|faction> command.
type FactionUnclaim ¶
type FactionUnclaim struct {
Unclaim cmd.SubCommand `cmd:"unclaim"`
// contains filtered or unexported fields
}
FactionUnclaim defines the structure for the /f unclaim command.
type SubCommand ¶
type SubCommand interface {
// Name is the name of the subcommand (e.g., "create", "invite").
Name() string
// Execute is the function called when a player uses the subcommand.
Execute(p *player.Player, args []string, s *session.Manager)
}
SubCommand defines the structure that all of our subcommands must have.