public static ProcessCommand ( |
||
p | ||
cmd | ||
return | void |
public static void ProcessCommand( Player p, Command cmd )
{
string command = cmd.Next();
if ( String.IsNullOrWhiteSpace( command ) ) {
p.Message( "&WLife command is missing or empty" );
return;
}
LifeCommand c;
if ( !Commands.TryGetValue( command.ToLower(), out c ) ) {
p.Message( "&WUnknown life command " + command + ". &hType '/life help' for the list of commands." );
return;
}
c.F( p, cmd );
}
private static void LifeHandlerFunc(Player p, Command cmd) { try { if (!cmd.HasNext) { p.Message("&H/Life <command> <params>. Commands are Help, Create, Delete, Start, Stop, Set, List, Print"); p.Message("Type /Life help <command> for more information"); return; } LifeHandler.ProcessCommand(p, cmd); } catch (Exception e) { p.Message("Error: " + e.Message); } }