fCraft.LifeHandler.CreateCommands C# (CSharp) Method

CreateCommands() private static method

private static CreateCommands ( ) : void
return void
        private static void CreateCommands()
        {
            //assuming each command has at least one name and no names repeating. Will throw on start if it is not the case.
            AddCommand( new LifeCommand() {
                Names = new string[] { "help", "h" },
                Help = "&hPrints help on commands. Usage: /life help <command|param>. For the list of parameters type '/life help set'. Commands are: ",
                F = OnHelp
            } );
            AddCommand( new LifeCommand() {
                Names = new string[] { "create", "new" },
                Help = "&hCreates a new life. Usage: /life create <name>. Then mark two blocks to define a *flat* rectangle. The life is created stopped and with default settings. After that you can set params by 'set' command and start it by 'start' command.",
                F = OnCreate
            } );
            AddCommand( new LifeCommand() {
                Names = new string[] { "delete", "del", "remove" },
                Help = "&hDeletes a life. Usage: /life delete <name>. If this life exists it will be stopped and removed from the map book keeping.",
                F = OnDelete
            } );
            AddCommand( new LifeCommand() {
                Names = new string[] { "start", "run" },
                Help = "&hStarts a stopped life. Usage: /life start <name>. If this life exists and is stopped it will be started. Otherwise nothing happens.",
                F = OnStart
            } );
            AddCommand( new LifeCommand() {
                Names = new string[] { "stop", "pause" },
                Help = "&hStops a life. Usage: /life stop <name>. If this life exists and is started it will be stopped. Otherwise nothing happens.",
                F = OnStop
            } );
            AddCommand( new LifeCommand() {
                Names = new string[] { "set" },
                Help = "&hSets a life parameter. Usage: /life set <name> <param>=<value>[| <param>=<value>]. Sets parameter 'param' value for the life 'name'. Parameters are: "
                    + AllParams.ToString(),
                F = OnSet
            } );
            AddCommand( new LifeCommand() {
                Names = new string[] { "list", "ls" },
                Help = "&hPrints all lifes in players world. Usage: /life list [started|stopped]",
                F = OnList
            } );
            AddCommand( new LifeCommand() {
                Names = new string[] { "print", "cat" },
                Help = "&hPrints this life settings. Usage: /life print <name>",
                F = OnPrint
            } );
        }