C# 클래스 SharpMod.Server

A class that represents the running Server
파일 보기 프로젝트 열기: txdv/sharpmod

공개 메소드들

메소드 설명
EnqueueCommand ( string command ) : void

Enques a command in the server command queue. Server.ExecuteEnqueuedCommands() is needed to execute all enqueued commands. If you want to call multiple commands at once, use the newline character in order to seperate the commands

ExecuteCommand ( string command ) : void

Enques and executes a command.

ExecuteEnqueuedCommands ( ) : void

Executes all enqueued commands.

IsMapValid ( string map ) : bool

Uses the engine function to check if a map is valid.

LoadMapListFromDirectory ( ) : string[]

Returns a list of all valid maps in the directory.

LoadMapListFromMapcycle ( ) : string[]

Returns a list of all valid maps in the mapcycle.

Log ( string message ) : void

Logs a plain message. Doesn't use any decoration.

LogConsole ( string message ) : void

Logs a plain message to the console, not in the files.

LogDeveloper ( string message ) : void
LogError ( string message ) : void

Logs an error message, uses date, mod, Error prefix.

PrecacheSound ( string filename ) : int

Precaches sound

Print ( string message ) : void
RegisterCommand ( string str, CommandDelegate cmd ) : bool

비공개 메소드들

메소드 설명
CommandWrapper ( ) : void
Init ( ) : void
Server ( ) : System
SetMaxPlayers ( int maxplayers ) : void

메소드 상세

EnqueueCommand() 공개 정적인 메소드

Enques a command in the server command queue. Server.ExecuteEnqueuedCommands() is needed to execute all enqueued commands. If you want to call multiple commands at once, use the newline character in order to seperate the commands
public static EnqueueCommand ( string command ) : void
command string /// The command to execute ///
리턴 void

ExecuteCommand() 공개 정적인 메소드

Enques and executes a command.
public static ExecuteCommand ( string command ) : void
command string /// The command to be executed ///
리턴 void

ExecuteEnqueuedCommands() 공개 정적인 메소드

Executes all enqueued commands.
public static ExecuteEnqueuedCommands ( ) : void
리턴 void

IsMapValid() 공개 정적인 메소드

Uses the engine function to check if a map is valid.
public static IsMapValid ( string map ) : bool
map string /// Name of the map ///
리턴 bool

LoadMapListFromDirectory() 공개 정적인 메소드

Returns a list of all valid maps in the directory.
public static LoadMapListFromDirectory ( ) : string[]
리턴 string[]

LoadMapListFromMapcycle() 공개 정적인 메소드

Returns a list of all valid maps in the mapcycle.
public static LoadMapListFromMapcycle ( ) : string[]
리턴 string[]

Log() 공개 정적인 메소드

Logs a plain message. Doesn't use any decoration.
public static Log ( string message ) : void
message string /// Log message ///
리턴 void

LogConsole() 공개 정적인 메소드

Logs a plain message to the console, not in the files.
public static LogConsole ( string message ) : void
message string /// A ///
리턴 void

LogDeveloper() 공개 정적인 메소드

public static LogDeveloper ( string message ) : void
message string
리턴 void

LogError() 공개 정적인 메소드

Logs an error message, uses date, mod, Error prefix.
public static LogError ( string message ) : void
message string /// Error message. ///
리턴 void

PrecacheSound() 공개 정적인 메소드

Precaches sound
public static PrecacheSound ( string filename ) : int
filename string /// A string representing the filename ///
리턴 int

Print() 공개 정적인 메소드

public static Print ( string message ) : void
message string
리턴 void

RegisterCommand() 공개 정적인 메소드

public static RegisterCommand ( string str, CommandDelegate cmd ) : bool
str string
cmd CommandDelegate
리턴 bool