C# 클래스 fCraft.CommandManager

Static class that allows registration and parsing of all text commands.
파일 보기 프로젝트 열기: GlennMR/800craft 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ReservedCommandNames string[]

공개 메소드들

메소드 설명
GetCommands ( ) : fCraft.CommandDescriptor[]

Gets a list of all commands (includding hidden ones).

GetCommands ( CommandCategory category, bool includeHidden ) : fCraft.CommandDescriptor[]

Gets a list of commands in a specified category. Note that commands may belong to more than one category.

GetCommands ( [ rank, bool includeHidden ) : fCraft.CommandDescriptor[]

Gets a list of commands available to a specified rank.

GetCommands ( bool hidden ) : fCraft.CommandDescriptor[]

Gets a list of ONLY hidden or non-hidden commands, not both.

Init ( ) : void
IsValidCommandName ( [ name ) : bool

Checks whether a command name is acceptible. Constraints are similar to Player.IsValidName, except for minimum length.

ParseCommand ( [ player, [ cmd, bool fromConsole ) : bool

Parses and calls a specified command.

RegisterCustomCommand ( [ descriptor ) : void

Registers a custom command with fCraft. CommandRegistrationException may be thrown if the given descriptor does not meet all the requirements.

비공개 메소드들

메소드 설명
GetDescriptor ( [ commandName, bool alsoCheckAliases ) : CommandDescriptor
RaiseCommandCalledEvent ( Command cmd, CommandDescriptor descriptor, Player player ) : void
RaiseCommandCallingEvent ( Command cmd, CommandDescriptor descriptor, Player player ) : bool
RaiseCommandRegisteredEvent ( CommandDescriptor descriptor ) : void
RaiseCommandRegisteringEvent ( CommandDescriptor descriptor ) : bool
RegisterCommand ( [ descriptor ) : void

메소드 상세

GetCommands() 공개 정적인 메소드

Gets a list of all commands (includding hidden ones).
public static GetCommands ( ) : fCraft.CommandDescriptor[]
리턴 fCraft.CommandDescriptor[]

GetCommands() 공개 정적인 메소드

Gets a list of commands in a specified category. Note that commands may belong to more than one category.
public static GetCommands ( CommandCategory category, bool includeHidden ) : fCraft.CommandDescriptor[]
category CommandCategory
includeHidden bool
리턴 fCraft.CommandDescriptor[]

GetCommands() 공개 정적인 메소드

Gets a list of commands available to a specified rank.
public static GetCommands ( [ rank, bool includeHidden ) : fCraft.CommandDescriptor[]
rank [
includeHidden bool
리턴 fCraft.CommandDescriptor[]

GetCommands() 공개 정적인 메소드

Gets a list of ONLY hidden or non-hidden commands, not both.
public static GetCommands ( bool hidden ) : fCraft.CommandDescriptor[]
hidden bool
리턴 fCraft.CommandDescriptor[]

Init() 공개 정적인 메소드

public static Init ( ) : void
리턴 void

IsValidCommandName() 공개 정적인 메소드

Checks whether a command name is acceptible. Constraints are similar to Player.IsValidName, except for minimum length.
public static IsValidCommandName ( [ name ) : bool
name [ Command name to check.
리턴 bool

ParseCommand() 공개 정적인 메소드

Parses and calls a specified command.
public static ParseCommand ( [ player, [ cmd, bool fromConsole ) : bool
player [ Player who issued the command.
cmd [ Command to be parsed and executed.
fromConsole bool Whether this command is being called from a non-player (e.g. Console).
리턴 bool

RegisterCustomCommand() 공개 정적인 메소드

Registers a custom command with fCraft. CommandRegistrationException may be thrown if the given descriptor does not meet all the requirements.
public static RegisterCustomCommand ( [ descriptor ) : void
descriptor [
리턴 void

프로퍼티 상세

ReservedCommandNames 공개적으로 정적으로 프로퍼티

public static string[] ReservedCommandNames
리턴 string[]