C# Class SharpMod.Command

A class for handling commands send by the players
Afficher le fichier Open project: txdv/sharpmod Class Usage Examples

Méthodes publiques

Méthode Description
Command ( string arguments ) : System

Constructor of the class

Execute ( Player player ) : void
FakeCall ( Player p ) : void

Emulates a player calling a command.

ToString ( ) : string

A string representation of the class. Returns a online command string, which could be written into the console.

Méthodes protégées

Méthode Description
OnFailure ( Player player ) : void
OnFailure ( int userid ) : void
OnFailure ( int userid, Exception exception ) : void
OnFailure ( int userid, string errorMessage ) : void
OnSuccess ( Player player ) : void
OnSuccess ( int userid ) : void
Write ( Player player, string text ) : void
WriteLine ( Player player, string text ) : void

Private Methods

Méthode Description
Escape ( string text ) : string

Method Details

Command() public méthode

Constructor of the class
public Command ( string arguments ) : System
arguments string /// A managed array with the arguments ///
Résultat System

Execute() public méthode

public Execute ( Player player ) : void
player Player
Résultat void

FakeCall() public méthode

Emulates a player calling a command.
public FakeCall ( Player p ) : void
p Player /// Instance of the player ///
Résultat void

OnFailure() protected méthode

protected OnFailure ( Player player ) : void
player Player
Résultat void

OnFailure() protected méthode

protected OnFailure ( int userid ) : void
userid int
Résultat void

OnFailure() protected méthode

protected OnFailure ( int userid, Exception exception ) : void
userid int
exception System.Exception
Résultat void

OnFailure() protected méthode

protected OnFailure ( int userid, string errorMessage ) : void
userid int
errorMessage string
Résultat void

OnSuccess() protected méthode

protected OnSuccess ( Player player ) : void
player Player
Résultat void

OnSuccess() protected méthode

protected OnSuccess ( int userid ) : void
userid int
Résultat void

ToString() public méthode

A string representation of the class. Returns a online command string, which could be written into the console.
public ToString ( ) : string
Résultat string

Write() protected static méthode

protected static Write ( Player player, string text ) : void
player Player
text string
Résultat void

WriteLine() protected static méthode

protected static WriteLine ( Player player, string text ) : void
player Player
text string
Résultat void