C# Class fCraft.CommandDescriptor

Describes a chat command. Defines properties, permission requirements, and usage information. Specifies a handler method.
Inheritance: IClassy
Mostra file Open project: GlennMR/800craft Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Call ( [ player, [ cmd, bool raiseEvent ) : bool

Calls this command.

CanBeCalledBy ( [ rank ) : bool

Checks whether this command may be called by players of a given rank.

IsVisibleTo ( [ rank ) : bool

Checks whether players of the given rank should see this command in /cmds list. Takes permissions and the hidden flag into account.

PrintHelpSection ( Player player, string sectionName ) : void

Prints a command HelpSection syntax to the given player. If that fails, it will print the usage instead

PrintUsage ( [ player ) : void

Prints command usage syntax to the given player.

ToString ( ) : string

Method Details

Call() public method

Calls this command.
public Call ( [ player, [ cmd, bool raiseEvent ) : bool
player [ Player who called the command.
cmd [ Command arguments.
raiseEvent bool Whether CommandCalling and CommandCalled events should be raised.
return bool

CanBeCalledBy() public method

Checks whether this command may be called by players of a given rank.
public CanBeCalledBy ( [ rank ) : bool
rank [
return bool

IsVisibleTo() public method

Checks whether players of the given rank should see this command in /cmds list. Takes permissions and the hidden flag into account.
public IsVisibleTo ( [ rank ) : bool
rank [
return bool

PrintHelpSection() public method

Prints a command HelpSection syntax to the given player. If that fails, it will print the usage instead
public PrintHelpSection ( Player player, string sectionName ) : void
player Player
sectionName string
return void

PrintUsage() public method

Prints command usage syntax to the given player.
public PrintUsage ( [ player ) : void
player [
return void

ToString() public method

public ToString ( ) : string
return string