C# Класс fCraft.CommandDescriptor

Describes a chat command. Defines properties, permission requirements, and usage information. Specifies a handler method.
Наследование: IClassy
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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

Описание методов

Call() публичный Метод

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.
Результат bool

CanBeCalledBy() публичный Метод

Checks whether this command may be called by players of a given rank.
public CanBeCalledBy ( [ rank ) : bool
rank [
Результат bool

IsVisibleTo() публичный Метод

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 [
Результат bool

PrintHelpSection() публичный Метод

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
Результат void

PrintUsage() публичный Метод

Prints command usage syntax to the given player.
public PrintUsage ( [ player ) : void
player [
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string