C# Class SharpMod.CommandManager

A class for managing all the command associations
Afficher le fichier Open project: txdv/sharpmod

Méthodes publiques

Méthode Description
CreateCommand ( CommandType type, string arguments ) : Command
RegisterCommand ( Type type ) : void
RegisterCommandHandler ( string str, ClientCommandDelegate handler ) : void

Registers a ClientCommand handler to a specific command

Private Methods

Méthode Description
CommandManager ( ) : System
CreateCommandFromGameEngine ( CommandType type ) : Command

Creates a command class instance using the gameengine command calls

Execute ( Player player, Command cmd ) : void

This function is used internally. It executes all needed handlers when a specific command occures.

ServerCommandHandler ( string arguments ) : void

Method Details

CreateCommand() public static méthode

public static CreateCommand ( CommandType type, string arguments ) : Command
type CommandType
arguments string
Résultat Command

RegisterCommand() public static méthode

public static RegisterCommand ( Type type ) : void
type System.Type
Résultat void

RegisterCommandHandler() public static méthode

Registers a ClientCommand handler to a specific command
public static RegisterCommandHandler ( string str, ClientCommandDelegate handler ) : void
str string /// The beginning of the string to witch it has to match (for example "say /death") ///
handler ClientCommandDelegate /// A handler which to invoke if command occures ///
Résultat void