Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ConsoleChannel = make(chan string)
)
View Source
var (
ConsoleSender = consoleSender{}
)
Functions ¶
func ExecuteCommand ¶
func ExecuteCommand(line string, sender CommandSender)
Called when a command is executed by the console or a player.
func RegisterBaseCommands ¶
func RegisterBaseCommands()
Types ¶
type BanCommand ¶
type BanCommand struct{}
func (BanCommand) Description ¶
func (cmd BanCommand) Description() string
func (BanCommand) Execute ¶
func (cmd BanCommand) Execute(label string, args []string, sender CommandSender)
func (BanCommand) Help ¶
func (cmd BanCommand) Help() string
func (BanCommand) Labels ¶
func (cmd BanCommand) Labels() []string
func (BanCommand) MinArgs ¶
func (cmd BanCommand) MinArgs() int
func (BanCommand) RequiredPermission ¶
func (cmd BanCommand) RequiredPermission() string
type Command ¶
type Command interface { // Must return the different labels with which you can call the command // (at least one). Labels() []string // The minimal number of arguments - 0 if not needed. MinArgs() int // Returns the permission required to execute the command. RequiredPermission() string // Returns command's help. Help() string // Returns command's description - used for the help command Description() string // Called when the command has to be executed. // Label is the label used by the sender, // arguments are the strings following the command (command <args>), // sender is the sender. Execute(label string, arguments []string, sender CommandSender) }
type CommandSender ¶
type HelpCommand ¶
type HelpCommand struct{}
func (HelpCommand) Description ¶
func (cmd HelpCommand) Description() string
func (HelpCommand) Execute ¶
func (cmd HelpCommand) Execute(label string, args []string, sender CommandSender)
func (HelpCommand) Help ¶
func (cmd HelpCommand) Help() string
func (HelpCommand) Labels ¶
func (cmd HelpCommand) Labels() []string
func (HelpCommand) MinArgs ¶
func (cmd HelpCommand) MinArgs() int
func (HelpCommand) RequiredPermission ¶
func (cmd HelpCommand) RequiredPermission() string
type StopCommand ¶
type StopCommand struct{}
func (StopCommand) Description ¶
func (cmd StopCommand) Description() string
func (StopCommand) Execute ¶
func (cmd StopCommand) Execute(label string, args []string, sender CommandSender)
func (StopCommand) Help ¶
func (cmd StopCommand) Help() string
func (StopCommand) Labels ¶
func (cmd StopCommand) Labels() []string
func (StopCommand) MinArgs ¶
func (cmd StopCommand) MinArgs() int
func (StopCommand) RequiredPermission ¶
func (cmd StopCommand) RequiredPermission() string
Click to show internal directories.
Click to hide internal directories.